summaryrefslogtreecommitdiffstats
path: root/apps
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
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')
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php2
-rw-r--r--apps/files_sharing/templates/public.php2
2 files changed, 3 insertions, 1 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
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index a593e596dfb..8bbb53fa4e0 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -92,7 +92,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
</div>
<div class="directLink">
<label for="directLink"><?php p($l->t('Direct link')) ?></label>
- <input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>">
+ <input id="directLink" type="text" readonly value="<?php p($_['previewURL']); ?>">
</div>
<?php endif; ?>
</div>