Skip to content

Commit

Permalink
fix: download from url triggered twice sometimes (#5319)
Browse files Browse the repository at this point in the history
解决Chrome、Safari通过路径一次下载两个文件的BUG
  • Loading branch information
wangwenting-dev authored Jan 8, 2025
1 parent bbbdbfa commit 16162c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/@core/base/shared/src/utils/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function downloadFileFromUrl({

if (isChrome || isSafari) {
triggerDownload(source, resolveFileName(source, fileName));
return;
}
if (!source.includes('?')) {
source += '?download';
Expand Down

0 comments on commit 16162c0

Please sign in to comment.