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.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index af0f0493f4c..d85dff7632f 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -7,7 +7,7 @@
*/
\OC_Util::checkLoggedIn();
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
@@ -26,6 +26,7 @@ if($maxX === 0 || $maxY === 0) {
exit;
}
+
try{
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
$preview->setFile($file);