summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-09-21 11:47:05 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-09-25 16:18:50 +0200
commit894958e3e217cd89bb7597fc4a8ea04634b137db (patch)
tree88f9b0c385e0172912532052f6e7173380c283be /apps/files_sharing/lib
parent7d8c5f73f551c0d7224bccef6af4b272c124b7e9 (diff)
downloadnextcloud-server-894958e3e217cd89bb7597fc4a8ea04634b137db.tar.gz
nextcloud-server-894958e3e217cd89bb7597fc4a8ea04634b137db.zip
For images we have a preview for use the preview link
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 14fc8d63381..ec345c4e984 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -375,8 +375,10 @@ class ShareController extends Controller {
if ($shareTmpl['previewSupported']) {
$shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview',
['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 't' => $shareTmpl['dirToken']]);
+ $shareTmpl['previewURL'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.publicpreview.directLink', ['token' => $token]);
} else {
$shareTmpl['previewImage'] = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'favicon-fb.png'));
+ $shareTmpl['previewURL'] = $shareTmpl['downloadURL'];
}
// Load files we need