From 0f6df2e0b66581b0ff84094acb18d5517b4eb687 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 28 Aug 2015 17:50:40 +0200 Subject: Allow creating previewss that cover the specified dimensions --- core/ajax/preview.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core') 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(); } -- cgit v1.2.3