summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-11-28 18:59:38 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2013-11-28 18:59:38 +0100
commitbef510821880df95eefc9b908997d5fdca8d1cbc (patch)
tree0991897e926cdf7f92fea16b68e00267a545b898 /apps/files_versions
parent863aedf784d582a458c8befd709795f2595e3ba6 (diff)
downloadnextcloud-server-bef510821880df95eefc9b908997d5fdca8d1cbc.tar.gz
nextcloud-server-bef510821880df95eefc9b908997d5fdca8d1cbc.zip
detect mimetype from the original filename, without the versioning timestamp
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/ajax/preview.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_versions/ajax/preview.php b/apps/files_versions/ajax/preview.php
index 62bcc03f522..31525028ef3 100644
--- a/apps/files_versions/ajax/preview.php
+++ b/apps/files_versions/ajax/preview.php
@@ -37,8 +37,9 @@ if($maxX === 0 || $maxY === 0) {
}
try{
- $preview = new \OC\Preview($user, 'files_versions');
- $preview->setFile($file.'.v'.$version);
+ $preview = new \OC\Preview($user, 'files_versions', $file.'.v'.$version);
+ $mimetype = \OC_Helper::getFileNameMimeType($file);
+ $preview->setMimetype($mimetype);
$preview->setMaxX($maxX);
$preview->setMaxY($maxY);
$preview->setScalingUp($scalingUp);