From 32c7f904db35a57e0d1477b99b6813f22971babc Mon Sep 17 00:00:00 2001 From: linyuchen Date: Wed, 15 May 2024 22:44:15 +0800 Subject: [PATCH] fix: Http download headers --- 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 046007c..2df5ec7 100644 --- a/src/common/utils/file.ts +++ b/src/common/utils/file.ts @@ -109,7 +109,7 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi } } } - const fetchRes = await net.fetch(url, headers) + const fetchRes = await net.fetch(url, {headers}) if (!fetchRes.ok) throw new Error(`下载文件失败: ${fetchRes.statusText}`) const blob = await fetchRes.blob()