summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-16 19:31:51 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-16 19:31:51 +0200
commit368391e40138739f6a02ad6cd44a925bdff970a8 (patch)
treee1c6f7ed88107b80b1f1ed18e01f77c6fe36dadc /lib
parent4ebc11aa8d44a8188d43b9f884bd306b4a2fc7a3 (diff)
parente62d5b7e55ea5eab098751146f6c49641574c7c9 (diff)
downloadnextcloud-server-368391e40138739f6a02ad6cd44a925bdff970a8.tar.gz
nextcloud-server-368391e40138739f6a02ad6cd44a925bdff970a8.zip
Merge pull request #11009 from owncloud/tobiasKaminsky-route
REST API for thumbnails
Diffstat (limited to 'lib')
-rwxr-xr-xlib/private/preview.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index d6bff961a73..bc3eccbafb4 100755
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -15,6 +15,7 @@ namespace OC;
use OC\Files\Filesystem;
use OC\Preview\Provider;
+use OCP\Files\NotFoundException;
require_once 'preview/image.php';
require_once 'preview/movies.php';
@@ -110,6 +111,11 @@ class Preview {
\OC_Log::write('core', 'No preview providers exist', \OC_Log::ERROR);
throw new \Exception('No preview providers');
}
+
+ // Check if file is valid
+ if($this->isFileValid() === false) {
+ throw new NotFoundException('File not found.');
+ }
}
/**