diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-07 14:16:38 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-03 14:00:32 +0100 |
commit | 743132650aa906d9468d633c2c5ca382e565df84 (patch) | |
tree | d9420b902aaf838ec7fac20944d2ed72c0100900 /core/ajax | |
parent | 958c1289b15f5bd877dd7ff3b7cf3540a0c5198a (diff) | |
download | nextcloud-server-743132650aa906d9468d633c2c5ca382e565df84.tar.gz nextcloud-server-743132650aa906d9468d633c2c5ca382e565df84.zip |
Move to AppData
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/ajax')
-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(); |