]> source.dussan.org Git - nextcloud-server.git/commitdiff
make image preview backend work with encryption
authorGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 08:45:21 +0000 (10:45 +0200)
committerGeorg Ehrke <georg@ownCloud.com>
Mon, 27 May 2013 08:45:21 +0000 (10:45 +0200)
lib/preview/images.php

index a0df337d58e2bae8118961547f1819cf2208f7ae..52aad67ca8b8da429bfe9ffb3b6e515e57a669f9 100644 (file)
@@ -14,11 +14,10 @@ class OC_Preview_Image extends OC_Preview_Provider{
 
        public function getThumbnail($path,$maxX,$maxY,$scalingup,$fileview) {
                //new image object
-               $image = new \OC_Image();
-               $image->loadFromFile($fileview->getLocalFile($path));
+               $image = new \OC_Image($fileview->fopen($path, 'r'));
                //check if image object is valid
                if (!$image->valid()) return false;
-
+               
                return $image;
        }
 }