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

Commit

Permalink
Add etag to the response
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed May 29, 2015
1 parent fd670b8 commit f0449b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
OCA.Files.App.fileList.lazyLoadPreview({
path: result.path,
mime: result.mime,
etag: result.etag,
callback: function (url) {
$row.find('td.icon').css('background-image', 'url(' + url + ')');
}
Expand Down
3 changes: 3 additions & 0 deletions search/luceneresult.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public function __construct(QueryHit $hit) {
$this->permissions = $this->getPermissions($this->path);
$this->modified = (int)$hit->mtime;
$this->mime_type = $hit->mimetype;

$fileInfo = \OC\Files\Filesystem::getFileInfo($this->path);
$this->etag = $fileInfo->getEtag();
}

protected function getRelativePath ($path) {
Expand Down

0 comments on commit f0449b3

Please sign in to comment.