diff options
Diffstat (limited to 'lib/private/preview/image.php')
-rw-r--r-- | lib/private/preview/image.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php index 986a44b48fd..e8473ebb8a4 100644 --- a/lib/private/preview/image.php +++ b/lib/private/preview/image.php @@ -26,6 +26,13 @@ class Image extends Provider { return false; } + $maxSizeForImages = \OC::$server->getConfig()->getSystemValue('preview_max_filesize_image', 50); + $size = $fileInfo->getSize(); + + if ($maxSizeForImages !== -1 && $size > ($maxSizeForImages * 1024 * 1024)) { + return false; + } + $image = new \OC_Image(); if($fileInfo['encrypted'] === true) { |