diff --git a/lib/private/preview.php b/lib/private/preview.php index 978da1161c23a452f1c04744748f347bcfaab4be..db2a56f9fa50e6ef2b8f8deaf512d0d97eb372ab 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -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(); }