fix: download from url triggered twice sometimes (#5319)

解决Chrome、Safari通过路径一次下载两个文件的BUG
pull/62/head
王文庭 2025-01-08 16:01:23 +08:00 committed by GitHub
parent bbbdbfa912
commit 16162c01ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ export async function downloadFileFromUrl({
if (isChrome || isSafari) {
triggerDownload(source, resolveFileName(source, fileName));
return;
}
if (!source.includes('?')) {
source += '?download';