diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2014-08-09 10:39:12 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-16 15:00:58 +0200 |
commit | e62d5b7e55ea5eab098751146f6c49641574c7c9 (patch) | |
tree | 166c7ceedb173845b36858ce7e32b19f4ca09090 /lib/private/preview.php | |
parent | 1978d3d6a279a4c60371b2cf809bd57e70f4ed35 (diff) | |
download | nextcloud-server-e62d5b7e55ea5eab098751146f6c49641574c7c9.tar.gz nextcloud-server-e62d5b7e55ea5eab098751146f6c49641574c7c9.zip |
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
Diffstat (limited to 'lib/private/preview.php')
-rwxr-xr-x | lib/private/preview.php | 6 |
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.'); + } } /** |