diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-02 10:11:18 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-02 10:11:18 +0200 |
commit | 8b08b1b455b474de3fa376dfafa3de63727364ea (patch) | |
tree | 536b2d4ba4f979d69f4f6e73755e06635345f78a /apps/files/js/files.js | |
parent | 084f76fd14125023d5b7277c558eb86a20ea07d3 (diff) | |
parent | 535ed8369f701a184340a428e82cc8d7cc7588bb (diff) | |
download | nextcloud-server-8b08b1b455b474de3fa376dfafa3de63727364ea.tar.gz nextcloud-server-8b08b1b455b474de3fa376dfafa3de63727364ea.zip |
Merge branch 'master' into sharing_mail_notification_master
Conflicts:
lib/private/util.php
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'); |