summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js4
-rw-r--r--apps/files/js/files.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 770d5fa3e09..503bf681139 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -137,7 +137,9 @@ window.FileList={
var download_url = null;
if (!param.download_url) {
- download_url = OC.Router.generate('download', { file: $('#dir').val()+'/'+name });
+ download_url = OC.generateUrl(
+ 'apps/files/download{file}',
+ { file: $('#dir').val()+'/'+name });
} else {
download_url = param.download_url;
}
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 48e5771ae8a..1186a72a44f 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -783,9 +783,9 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) {
if ( $('#isPublic').length ) {
urlSpec.t = $('#dirToken').val();
- previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec);
+ previewURL = OC.generateUrl('/publicpreview.png?') + $.param(urlSpec);
} else {
- previewURL = OC.Router.generate('core_ajax_preview', urlSpec);
+ previewURL = OC.generateUrl('/core/preview.png?') + $.param(urlSpec);
}
previewURL = previewURL.replace('(', '%28');
previewURL = previewURL.replace(')', '%29');