summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-13 10:27:41 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-13 10:27:41 +0200
commite3f6abf1f012ad06fc4a22acd9b2999ed620c6ee (patch)
treecc8685136fc250a28ba54d8364220071f2d7a3f1 /lib
parenta60db322c22c66d3078bf8036a5423b8f0f5731c (diff)
parentda0e37ef0372b29bd0780709e3cf9d3c715ee63f (diff)
downloadnextcloud-server-e3f6abf1f012ad06fc4a22acd9b2999ed620c6ee.tar.gz
nextcloud-server-e3f6abf1f012ad06fc4a22acd9b2999ed620c6ee.zip
Merge pull request #8546 from owncloud/fix-preview-orientation-encrypted-master
Rotate thumbnail when encryption is enabled
Diffstat (limited to 'lib')
-rw-r--r--lib/private/preview/image.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/preview/image.php b/lib/private/preview/image.php
index 59aaa27ef34..cec5d7c0170 100644
--- a/lib/private/preview/image.php
+++ b/lib/private/preview/image.php
@@ -22,12 +22,13 @@ class Image extends Provider {
}
$image = new \OC_Image();
- //check if file is encrypted
+
if($fileInfo['encrypted'] === true) {
- $image->loadFromData(stream_get_contents($fileview->fopen($path, 'r')));
- }else{
- $image->loadFromFile($fileview->getLocalFile($path));
+ $fileName = $fileview->toTmpFile($path);
+ } else {
+ $fileName = $fileview->getLocalFile($path);
}
+ $image->loadFromFile($fileName);
return $image->valid() ? $image : false;
}