chore: attachement 兼容文件名空格转义成 + 号的情况 Closes #8488 (#8846)

This commit is contained in:
吴多益 2023-11-23 19:13:29 +08:00 committed by GitHub
parent 15788a936d
commit 819d4ae6ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,8 @@ export function attachmentAdpator(
// 很可能是中文被 url-encode 了
if (filename && filename.replace(/[^%]/g, '').length > 2) {
filename = decodeURIComponent(filename);
// 有些后端用错了,导致空格转义成了 +,这里转回来
filename = filename.replace(/\+/g, ' ');
}
}