diff options
author | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 16:12:04 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2012-10-05 16:12:04 +0200 |
commit | 5e2bce24b4d7576f2503edb762afd6cbe3caccea (patch) | |
tree | 69c2dde5c99fcaaabd510b048077da7585d44d56 /apps/files | |
parent | c99f62891a53097115c07f6e860b4dfdf4d70600 (diff) | |
download | nextcloud-server-5e2bce24b4d7576f2503edb762afd6cbe3caccea.tar.gz nextcloud-server-5e2bce24b4d7576f2503edb762afd6cbe3caccea.zip |
enable user to download selected files from publically shared directory
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/files.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 414dfb03cdc..e4037454520 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -178,7 +178,12 @@ $(document).ready(function() { var dir=$('#dir').val()||'/'; $('#notification').text(t('files','generating ZIP-file, it may take some time.')); $('#notification').fadeIn(); - window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files }); + // use special download URL if provided, e.g. for public shared files + if ( (downloadURL = document.getElementById("downloadURL")) ) { + window.location=downloadURL.value+"&download&files="+files; + } else { + window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files }); + } return false; }); |