summaryrefslogtreecommitdiffstats
path: root/core/ajax/preview.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax/preview.php')
-rw-r--r--core/ajax/preview.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index d38043707ac..a08f1563b0a 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -34,7 +34,8 @@ if ($maxX === 0 || $maxY === 0) {
try {
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
- if (!$always and !$preview->isMimeSupported(\OC\Files\Filesystem::getMimeType($file))) {
+ $info = \OC\Files\Filesystem::getFileInfo($file);
+ if (!$always and !$preview->isAvailable($info)) {
\OC_Response::setStatus(404);
} else {
$preview->setFile($file);