diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-08-28 17:50:40 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-09-02 10:32:39 +0200 |
commit | 0f6df2e0b66581b0ff84094acb18d5517b4eb687 (patch) | |
tree | 4d12092089febbdf9bf693ddd0acce22da86d08a /core/ajax | |
parent | 73b43db4f92e76a481ec3855354aef84f6b51c5e (diff) | |
download | nextcloud-server-0f6df2e0b66581b0ff84094acb18d5517b4eb687.tar.gz nextcloud-server-0f6df2e0b66581b0ff84094acb18d5517b4eb687.zip |
Allow creating previewss that cover the specified dimensions
Diffstat (limited to 'core/ajax')
-rw-r--r-- | core/ajax/preview.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php index fc98d80eb0e..baa0ed4ec61 100644 --- a/core/ajax/preview.php +++ b/core/ajax/preview.php @@ -31,6 +31,7 @@ $maxY = array_key_exists('y', $_GET) ? (int)$_GET['y'] : '36'; $scalingUp = array_key_exists('scalingup', $_GET) ? (bool)$_GET['scalingup'] : true; $keepAspect = array_key_exists('a', $_GET) ? true : false; $always = array_key_exists('forceIcon', $_GET) ? (bool)$_GET['forceIcon'] : true; +$mode = array_key_exists('mode', $_GET) ? $_GET['mode'] : 'fill'; if ($file === '') { //400 Bad Request @@ -56,6 +57,7 @@ if (!$info instanceof OCP\Files\FileInfo || !$always && !\OC::$server->getPrevie $preview->setMaxX($maxX); $preview->setMaxY($maxY); $preview->setScalingUp($scalingUp); + $preview->setMode($mode); $preview->setKeepAspect($keepAspect); $preview->showPreview(); } |