detect mimetype from the original filename, without the versioning timestamp

This commit is contained in:
Bjoern Schiessle 2013-11-28 18:59:38 +01:00
parent 863aedf784
commit bef5108218

View file

@ -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);