diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-02-13 23:35:33 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-02-13 23:35:37 +0100 |
commit | 29fc82c364e2e90330d9858528e50d785e5e66bd (patch) | |
tree | c5b50a3b632ee5186cdaca10113a6438f244bfae /apps/gallery/ajax | |
parent | 594dcf13f2d311ba2161e33effe6e297939e3595 (diff) | |
download | nextcloud-server-29fc82c364e2e90330d9858528e50d785e5e66bd.tar.gz nextcloud-server-29fc82c364e2e90330d9858528e50d785e5e66bd.zip |
Send gallery album thumbnail with OC_Response::sendFile
Diffstat (limited to 'apps/gallery/ajax')
-rw-r--r-- | apps/gallery/ajax/galleryOp.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php index 9273de2599d..5ac6d295108 100644 --- a/apps/gallery/ajax/galleryOp.php +++ b/apps/gallery/ajax/galleryOp.php @@ -41,9 +41,9 @@ function handleRemove($name) { function handleGetThumbnails($albumname) { OC_Response::enableCaching(3600 * 24); // 24 hour - $photo = new OC_Image(); - $photo->loadFromFile(OC::$CONFIG_DATADIRECTORY.'/../gallery/'.$albumname.'.png'); - $photo->show(); + $thumbnail = OC::$CONFIG_DATADIRECTORY.'/../gallery/'.$albumname.'.png'; + header('Content-Type: '.OC_Image::getMimeTypeForFile($thumbnail)); + OC_Response::sendFile($thumbnail); } function handleGalleryScanning() { |