diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-26 22:41:41 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-26 22:41:41 +0200 |
commit | 093799f4b057b0c5b3bdbe5ed39c715cd015cc2a (patch) | |
tree | 297a81d3c78c36affa770708d8caab1df3cd2fee | |
parent | 6514bf1e18485bd5e94ea01c5e49ca2d74c3023b (diff) | |
download | nextcloud-server-093799f4b057b0c5b3bdbe5ed39c715cd015cc2a.tar.gz nextcloud-server-093799f4b057b0c5b3bdbe5ed39c715cd015cc2a.zip |
Use OC.generateUrl to properly prefix preview images
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | apps/files_sharing/js/public.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 35ffd9ff65e..998964b2d8a 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -148,7 +148,7 @@ OCA.Sharing.PublicApp = { } else if ((previewSupported === 'true' && mimetype.substr(0, mimetype.indexOf('/')) !== 'video') || mimetype.substr(0, mimetype.indexOf('/')) === 'image' && mimetype !== 'image/svg+xml') { - img.attr('src', OC.linkTo('files_sharing', '/publicpreview/'+token) + '?' + OC.buildQueryString(params)); + img.attr('src', OC.generateUrl('/apps/files_sharing/publicpreview/' + token + '?' + OC.buildQueryString(params))); imgcontainer.appendTo('#imgframe'); } else if (mimetype.substr(0, mimetype.indexOf('/')) !== 'video') { img.attr('src', OC.Util.replaceSVGIcon(mimetypeIcon)); @@ -156,7 +156,7 @@ OCA.Sharing.PublicApp = { imgcontainer.appendTo('#imgframe'); } else if (previewSupported === 'true') { - $('#imgframe > video').attr('poster', OC.generateUrl(OC.linkTo('files_sharing', '/publicpreview/'+token)) + '?' + OC.buildQueryString(params)); + $('#imgframe > video').attr('poster', OC.generateUrl('/apps/files_sharing/publicpreview/' + token + '?' + OC.buildQueryString(params))); } if (this.fileList) { @@ -222,7 +222,7 @@ OCA.Sharing.PublicApp = { urlSpec.x = Math.ceil(urlSpec.x); urlSpec.y = Math.ceil(urlSpec.y); var token = $('#dirToken').val(); - return OC.generateUrl(OC.linkTo('files_sharing', '/publicpreview/'+token) + '?' + OC.buildQueryString(urlSpec)); + return OC.generateUrl('/apps/files_sharing/publicpreview/' + token + '?' + OC.buildQueryString(urlSpec)); }; this.fileList.updateEmptyContent = function() { |