Commit 16162c01 by 王文庭 Committed by GitHub

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

解决Chrome、Safari通过路径一次下载两个文件的BUG
1 parent bbbdbfa9
...@@ -31,6 +31,7 @@ export async function downloadFileFromUrl({ ...@@ -31,6 +31,7 @@ export async function downloadFileFromUrl({
if (isChrome || isSafari) { if (isChrome || isSafari) {
triggerDownload(source, resolveFileName(source, fileName)); triggerDownload(source, resolveFileName(source, fileName));
return;
} }
if (!source.includes('?')) { if (!source.includes('?')) {
source += '?download'; source += '?download';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!