diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-13 10:27:41 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-13 10:27:41 +0200 |
commit | e3f6abf1f012ad06fc4a22acd9b2999ed620c6ee (patch) | |
tree | cc8685136fc250a28ba54d8364220071f2d7a3f1 /lib | |
parent | a60db322c22c66d3078bf8036a5423b8f0f5731c (diff) | |
parent | da0e37ef0372b29bd0780709e3cf9d3c715ee63f (diff) | |
download | nextcloud-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.php | 9 |
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; } |