fix missing filename urlencoding in multidownload

This commit is contained in:
myl7 2022-05-09 16:05:18 +08:00
parent 152380bd05
commit e7cf44b52a

View file

@ -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) {