From e62d5b7e55ea5eab098751146f6c49641574c7c9 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Sat, 9 Aug 2014 10:39:12 +0200 Subject: Route for thumbnail generation Thumbnail generation Removed Log Added requested changes Added requested changes. - Fix code style - Add exception if file does not exist - Switch route styling Replaces https://github.com/owncloud/core/pull/10805 Fix codestyle Fix codestyle Migrate to appframework Fix typo --- lib/private/preview.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/private/preview.php') 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.'); + } } /** -- cgit v1.2.3