From 5ddabd7cd02108718b286b36de5927d90afc150a Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 3 Mar 2014 12:23:21 +0100 Subject: fix mimetype detection, introduce fake etag to identify preview images --- apps/files_trashbin/lib/helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/files_trashbin/lib') diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php index 4bb51860485..fe0d1d30a72 100644 --- a/apps/files_trashbin/lib/helper.php +++ b/apps/files_trashbin/lib/helper.php @@ -41,7 +41,7 @@ class Helper $result[] = array( 'id' => $id, 'timestamp' => $timestamp, - 'mime' => $view->getMimeType($dir . '/' . $entryName), + 'mime' => \OC_Helper::getFileNameMimeType($id), 'type' => $view->is_dir($dir . '/' . $entryName) ? 'dir' : 'file', 'location' => $dir, ); @@ -58,6 +58,7 @@ class Helper $i['name'] = $r['id']; $i['date'] = \OCP\Util::formatDate($r['timestamp']); $i['timestamp'] = $r['timestamp']; + $i['etag'] = $r['timestamp']; // add fake etag, it is only needed to identify the preview image $i['mimetype'] = $r['mime']; $i['type'] = $r['type']; if ($i['type'] === 'file') { -- cgit v1.2.3