diff options
Diffstat (limited to 'core/ajax/preview2.php')
-rw-r--r-- | core/ajax/preview2.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/ajax/preview2.php b/core/ajax/preview2.php index b2bbf64c6d2..7ac50282190 100644 --- a/core/ajax/preview2.php +++ b/core/ajax/preview2.php @@ -30,7 +30,11 @@ $file = $userFolder->get($file); $p = new \OC\Preview2(\OC::$server->getRootFolder(), \OC::$server->getConfig(), \OC::$server->getPreviewManager(), - $file); + $file, + \OC::$server->getAppDataDir('preview')); -$p->getPreview($maxX, $maxY, !$keepAspect, $mode); +$image = $p->getPreview($maxX, $maxY, !$keepAspect, $mode); + +header('Content-Type: ' . $image->getMimeType()); +echo $image->getContent(); |