From 5e2bce24b4d7576f2503edb762afd6cbe3caccea Mon Sep 17 00:00:00 2001 From: Björn Schießle Date: Fri, 5 Oct 2012 16:12:04 +0200 Subject: enable user to download selected files from publically shared directory --- apps/files/js/files.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/files/js/files.js') 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; }); -- cgit v1.2.3