diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-03 12:23:21 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-10 15:13:28 +0100 |
commit | 5ddabd7cd02108718b286b36de5927d90afc150a (patch) | |
tree | 454e0196042a705265e8fc81be6f62f510c4aabb /apps | |
parent | 4562909a2021be795b89cb7fcf6f244d7f6a8204 (diff) | |
download | nextcloud-server-5ddabd7cd02108718b286b36de5927d90afc150a.tar.gz nextcloud-server-5ddabd7cd02108718b286b36de5927d90afc150a.zip |
fix mimetype detection, introduce fake etag to identify preview images
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_trashbin/lib/helper.php | 3 |
1 files changed, 2 insertions, 1 deletions
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') { |