Skip to content
Snippets Groups Projects
Commit 005d8e98 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

update images.php

parent 62411965
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,20 @@ class OC_Preview_Image extends OC_Preview_Provider{
}
public function getThumbnail($path,$maxX,$maxY,$scalingup,$fileview) {
//new image object
$image = new \OC_Image($fileview->fopen($path, 'r'));
//get fileinfo
$fileinfo = $fileview->getFileInfo($path);
//check if file is encrypted
if($fileinfo['encrypted'] === true){
$image = new \OC_Image($fileview->fopen($path, 'r'));
}else{
$image = new \OC_Image();
$image->loadFromFile($fileview->getLocalFile($path));
}
//check if image object is valid
if (!$image->valid()) return false;
return $image;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment