Merge pull request #16125 from nextcloud/backport/16114/stable16

[stable16] Fix download link included in public share page with hidden download
This commit is contained in:
Roeland Jago Douma 2019-06-27 22:14:11 +02:00 committed by GitHub
commit 02cc18b759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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