summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-07-27 09:33:00 +0200
committerGitHub <noreply@github.com>2018-07-27 09:33:00 +0200
commit5edab3b31153d5d328c746f57c90ffbcc8dd6170 (patch)
tree076774f658aa8b8ea5742208d05b6871a3b1dc2f /apps
parent6ab9f3ef9997d9d7ccd2aec81cfa16a4ddc55d84 (diff)
parent093799f4b057b0c5b3bdbe5ed39c715cd015cc2a (diff)
downloadnextcloud-server-5edab3b31153d5d328c746f57c90ffbcc8dd6170.tar.gz
nextcloud-server-5edab3b31153d5d328c746f57c90ffbcc8dd6170.zip
Merge pull request #10416 from nextcloud/bugfix/10414/fix-preview-url
Use OC.generateUrl to properly prefix preview images
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js6
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() {