aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-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 edbd41d2db4..d2811f39dd6 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -30,7 +30,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);