diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-03-09 08:43:11 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-03-09 08:43:11 +0100 |
commit | a03173caeeb257f75d837a5b8ba18ac887294755 (patch) | |
tree | 3f8c781dc5165df48b7cfea537294bd84eb137bd /apps | |
parent | 7a94a58543157e78f286b8f33f5d1bdec4640a85 (diff) | |
parent | 4bc0eb546c1fd3e3a281ab6ae9eae4ca14dc47db (diff) | |
download | nextcloud-server-a03173caeeb257f75d837a5b8ba18ac887294755.tar.gz nextcloud-server-a03173caeeb257f75d837a5b8ba18ac887294755.zip |
Merge pull request #22923 from owncloud/stable8.2-share-archivenamedownloadall
[stable8.2] Fix archive file name when downloading public share
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/js/public.js | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/controllers/sharecontroller.php | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index b684e08be8b..cdeeb598e40 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -142,9 +142,11 @@ OCA.Sharing.PublicApp = { } var path = dir || FileList.getCurrentDirectory(); var params = { - path: path, - files: filename + path: path }; + if (filename) { + params.files = filename; + } return OC.generateUrl('/s/' + token + '/download') + '?' + OC.buildQueryString(params); }; diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index 4d227e78ff7..220da77cdaf 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -304,7 +304,7 @@ class ShareController extends Controller { } // download selected files - if (!is_null($files)) { + if (!is_null($files) && $files !== '') { // FIXME: The exit is required here because otherwise the AppFramework is trying to add headers as well // after dispatching the request which results in a "Cannot modify header information" notice. OC_Files::get($originalSharePath, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD'); |