From 80e64af30f76c650194c14fed76f153ce2c42f82 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Sun, 12 May 2024 21:46:13 +0800 Subject: [PATCH] fix: Fetch miss ua --- src/common/utils/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/utils/file.ts b/src/common/utils/file.ts index e019d9ee..55d5a7a5 100644 --- a/src/common/utils/file.ts +++ b/src/common/utils/file.ts @@ -125,7 +125,7 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi } } } - const fetchRes = await fetch(url, headers); + const fetchRes = await fetch(url, { headers }); if (!fetchRes.ok) throw new Error(`下载文件失败: ${fetchRes.statusText}`); const blob = await fetchRes.blob();