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.
This commit is contained in:
Vincent Petry 2016-03-07 11:55:55 +01:00
parent d8e592d670
commit dbea268332
1 changed files with 4 additions and 2 deletions

View File

@ -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);
};