mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #18911 from owncloud/preview-show-cached-directly
Show cached previews directly
This commit is contained in:
commit
188d6d2e28
1 changed files with 6 additions and 0 deletions
|
|
@ -772,6 +772,12 @@ class Preview {
|
|||
throw new NotFoundException('File not found.');
|
||||
}
|
||||
|
||||
if ($cachedPath = $this->isCached($this->info->getId())) {
|
||||
header('Content-Type: ' . $this->info->getMimetype());
|
||||
$this->userView->readfile($cachedPath);
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_null($this->preview)) {
|
||||
$this->getPreview();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue