diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2014-01-29 00:39:14 -0800 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2014-01-29 00:39:14 -0800 |
commit | cf2c061f1f2577b3a995d9e2423c93589d7df2b3 (patch) | |
tree | 43cf27eac956eff737b2a5edfcab429c811e403e /apps/files_sharing/js/public.js | |
parent | 75c8d74c945293a65f0009caeb5a1ba33f21e37b (diff) | |
parent | c6695bbd764be9f43067c09894e36422c2b92b49 (diff) | |
download | nextcloud-server-cf2c061f1f2577b3a995d9e2423c93589d7df2b3.tar.gz nextcloud-server-cf2c061f1f2577b3a995d9e2423c93589d7df2b3.zip |
Merge pull request #6929 from owncloud/sharing-fixfiledownloadlink
Sharing fixfiledownloadlink
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 4c0b0ad9d48..79c15623c0c 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -34,18 +34,16 @@ $(document).ready(function() { window.location = $(tr).find('a.name').attr('href'); } }); - FileActions.register('file', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = FileList.findFileEl(filename); - if (tr.length > 0) { - window.location = $(tr).find('a.name').attr('href'); - } - }); - FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) { + + // override since the format is different + FileList.getDownloadUrl = function(filename, dir) { + // we use this because we need the service and token attributes var tr = FileList.findFileEl(filename); if (tr.length > 0) { - window.location = $(tr).find('a.name').attr('href')+'&download'; + return $(tr).find('a.name').attr('href') + '&download'; } - }); + return null; + }; } var file_upload_start = $('#file_upload_start'); |