diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-30 15:08:53 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-30 15:08:53 +0200 |
commit | 4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae (patch) | |
tree | 5556fd4f3d9c638bb11cdad4c1aed31e09b9263d /apps/files/js | |
parent | 54965ce065ba7447cee2f4f60fe1babcc7371214 (diff) | |
parent | 480aeb804fc64be6fdcb1551f89e21304e270b33 (diff) | |
download | nextcloud-server-4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae.tar.gz nextcloud-server-4d79e7e6733d06da6f4d7f0c44ef95a2a96c4aae.zip |
Merge branch 'master' into encryption_improved_error_messages_4617
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/files.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 5edab491538..55ee89e17a2 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -653,7 +653,11 @@ function lazyLoadPreview(path, mime, ready, width, height) { if ( ! height ) { height = $('#filestable').data('preview-y'); } - var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:width, y:height}); + if( $('#publicUploadButtonMock').length ) { + var previewURL = OC.Router.generate('core_ajax_public_preview', {file: encodeURIComponent(path), x:width, y:height, t:$('#dirToken').val()}); + } else { + var previewURL = OC.Router.generate('core_ajax_preview', {file: encodeURIComponent(path), x:width, y:height}); + } $.get(previewURL, function() { previewURL = previewURL.replace('(', '%28'); previewURL = previewURL.replace(')', '%29'); |