Show cached previews directly

This commit is contained in:
Robin Appelman 2015-09-08 19:51:15 +02:00
parent f3e6e0121d
commit 1b708e26ef
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}