summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-03-03 12:23:21 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-03-10 15:13:28 +0100
commit5ddabd7cd02108718b286b36de5927d90afc150a (patch)
tree454e0196042a705265e8fc81be6f62f510c4aabb /apps
parent4562909a2021be795b89cb7fcf6f244d7f6a8204 (diff)
downloadnextcloud-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.php3
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') {