summaryrefslogtreecommitdiffstats
path: root/core/ajax/preview.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/ajax/preview.php')
-rw-r--r--core/ajax/preview.php2
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();
}