From 9bbc4f3bc6d75975c01f4b0456b284260e99142a Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Sat, 17 Aug 2013 13:30:21 +0300 Subject: [PATCH] Background fix. Stay away from OC_Image --- ajax/thumbnail.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ajax/thumbnail.php b/ajax/thumbnail.php index de3aabad..b2713cae 100644 --- a/ajax/thumbnail.php +++ b/ajax/thumbnail.php @@ -61,10 +61,9 @@ if (method_exists('\OCP\Preview', 'show')){ $iconFile = \OC::$SERVERROOT . '/core/img/filetypes/file.png'; } - $iconData = base64_encode(file_get_contents($iconFile)); - $image = new \OC_Image($iconData); \OC_Util::obEnd(); - echo $image->show(); + header('Content-Type: ' . \OCP\Files::getMimeType($iconFile)); + readfile($iconFile); }