summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-09-18 13:02:10 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-09-18 13:02:10 +0200
commit188d6d2e286ea84e7b1ec601783a6dc37ec1b25c (patch)
treec5ee4d8131138a0e69c1fdec55c258536c578a2a /lib
parent0101b1c65f114345e183bcef6877b61cd83feb93 (diff)
parent1b708e26efbcb4052becad3d7b6618064c2605a6 (diff)
downloadnextcloud-server-188d6d2e286ea84e7b1ec601783a6dc37ec1b25c.tar.gz
nextcloud-server-188d6d2e286ea84e7b1ec601783a6dc37ec1b25c.zip
Merge pull request #18911 from owncloud/preview-show-cached-directly
Show cached previews directly
Diffstat (limited to 'lib')
-rw-r--r--lib/private/preview.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php
index 978da1161c2..db2a56f9fa5 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();
}