fix mimetype detection, introduce fake etag to identify preview images
This commit is contained in:
parent
4562909a20
commit
5ddabd7cd0
1 changed files with 2 additions and 1 deletions
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue