Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Commit f0449b3

Browse files
committed
Add etag to the response
1 parent fd670b8 commit f0449b3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

js/search.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
OCA.Files.App.fileList.lazyLoadPreview({
2121
path: result.path,
2222
mime: result.mime,
23+
etag: result.etag,
2324
callback: function (url) {
2425
$row.find('td.icon').css('background-image', 'url(' + url + ')');
2526
}

search/luceneresult.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function __construct(QueryHit $hit) {
4949
$this->permissions = $this->getPermissions($this->path);
5050
$this->modified = (int)$hit->mtime;
5151
$this->mime_type = $hit->mimetype;
52+
53+
$fileInfo = \OC\Files\Filesystem::getFileInfo($this->path);
54+
$this->etag = $fileInfo->getEtag();
5255
}
5356

5457
protected function getRelativePath ($path) {

0 commit comments

Comments
 (0)