diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-28 18:59:38 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-11-28 18:59:38 +0100 |
commit | bef510821880df95eefc9b908997d5fdca8d1cbc (patch) | |
tree | 0991897e926cdf7f92fea16b68e00267a545b898 /apps/files_versions | |
parent | 863aedf784d582a458c8befd709795f2595e3ba6 (diff) | |
download | nextcloud-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.php | 5 |
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); |