From e7cf44b52a067e1d85ae5c4584979a93c47ffd11 Mon Sep 17 00:00:00 2001 From: myl7 Date: Mon, 9 May 2022 16:05:18 +0800 Subject: [PATCH] fix missing filename urlencoding in multidownload --- components/FileListing.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/FileListing.tsx b/components/FileListing.tsx index 2d6de8e..554109d 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -240,7 +240,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => { .filter(c => selected[c.id]) .map(c => ({ name: c.name, - url: `/api/raw/?path=${path}/${c.name}${hashedToken ? `&odpt=${hashedToken}` : ''}`, + url: `/api/raw/?path=${path}/${encodeURIComponent(c.name)}${hashedToken ? `&odpt=${hashedToken}` : ''}`, })) if (files.length == 1) {