summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-03-07 11:55:55 +0100
committerVincent Petry <pvince81@owncloud.com>2016-03-07 11:55:55 +0100
commitdbea268332aef3c9f3053f9fe55fbaa9ea43b7d8 (patch)
tree5bad4210c76064ce66d48e6ec1073fe912a8d8af
parentd8e592d6701abfd4ce956a835a82015df6e06a48 (diff)
downloadnextcloud-server-dbea268332aef3c9f3053f9fe55fbaa9ea43b7d8.tar.gz
nextcloud-server-dbea268332aef3c9f3053f9fe55fbaa9ea43b7d8.zip
Remove "files" arg from download URL in public link page
When no files were specified for download, it means folder download. In this case, no need to pass an empty "files" argument.
-rw-r--r--apps/files_sharing/js/public.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index da83044714e..70d5d619c12 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -158,9 +158,11 @@ OCA.Sharing.PublicApp = {
filename = JSON.stringify(filename);
}
var params = {
- path: path,
- files: filename
+ path: path
};
+ if (filename) {
+ params.files = filename;
+ }
return OC.generateUrl('/s/' + token + '/download') + '?' + OC.buildQueryString(params);
};