summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/js/public.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index d339ae1dcb4..e4a6bbd3ed1 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -136,9 +136,11 @@ OCA.Sharing.PublicApp = {
scalingup: 0
};
- var imgcontainer = $('<a href="' + $('#previewURL').val()
- + '" target="_blank"><img class="publicpreview" alt=""></a>');
- var img = imgcontainer.find('.publicpreview');
+ var imgcontainer = $('<img class="publicpreview" alt="">');
+ if (hideDownload === 'false') {
+ imgcontainer = $('<a href="' + $('#previewURL').val() + '" target="_blank"></a>').append(imgcontainer);
+ }
+ var img = imgcontainer.hasClass('publicpreview')? imgcontainer: imgcontainer.find('.publicpreview');
img.css({
'max-width': previewWidth,
'max-height': previewHeight