Browse Source
fix: download from url triggered twice sometimes (#5319)
解决Chrome、Safari通过路径一次下载两个文件的BUG
pull/5328/head
王文庭
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
0 deletions
-
packages/@core/base/shared/src/utils/download.ts
|
|
|
@ -31,6 +31,7 @@ export async function downloadFileFromUrl({ |
|
|
|
|
|
|
|
if (isChrome || isSafari) { |
|
|
|
triggerDownload(source, resolveFileName(source, fileName)); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!source.includes('?')) { |
|
|
|
source += '?download'; |
|
|
|
|