diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-23 06:31:50 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-23 06:31:50 -0700 |
commit | 46f64cc39a32494d2b83fecb2acbe265d3f77271 (patch) | |
tree | 4d5c51204ff40d7d9478c8785afb734038f64b1f /apps/files/js/files.js | |
parent | 437858852c039ba7fef7e6cf2a4a2e9dae68c1a2 (diff) | |
parent | 8a1618bce56a32e311626cd9f0e322dd7cf330c4 (diff) | |
download | nextcloud-server-46f64cc39a32494d2b83fecb2acbe265d3f77271.tar.gz nextcloud-server-46f64cc39a32494d2b83fecb2acbe265d3f77271.zip |
Merge pull request #4950 from owncloud/fix_preview_shared_folder
Fix preview for shared folder and public upload
Diffstat (limited to 'apps/files/js/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 8ccb448abfb..ec688eaf63e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -644,7 +644,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'); |