fix: download path encoding file paths

This commit is contained in:
jagadam97 2026-01-01 15:38:29 +05:30
parent 943e5340d0
commit b4710b4e2d

View File

@ -41,12 +41,12 @@ export function download(
let url = `${baseURL}/api/public/dl/${hash}`; let url = `${baseURL}/api/public/dl/${hash}`;
if (files.length === 1) { if (files.length === 1) {
url += encodeURIComponent(files[0]) + "?"; url += files[0] + "?";
} else { } else {
let arg = ""; let arg = "";
for (const file of files) { for (const file of files) {
arg += encodeURIComponent(file) + ","; arg += file + ",";
} }
arg = arg.substring(0, arg.length - 1); arg = arg.substring(0, arg.length - 1);