Skip to content
Snippets Groups Projects
Commit 188d6d2e authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #18911 from owncloud/preview-show-cached-directly

Show cached previews directly
parents 0101b1c6 1b708e26
Branches
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment