chore: allow download url for installers (#1437)

This commit is contained in:
Huang Xin
2025-06-21 17:13:59 +08:00
committed by GitHub
parent dd43569778
commit 60e48742fe
2 changed files with 6 additions and 3 deletions
@@ -54,11 +54,14 @@
"identifier": "http:default",
"allow": [
{
"url": "https://*.deepl.com"
"url": "https://*.readest.com"
},
{
"url": "https://github.com/readest/*"
},
{
"url": "https://*.deepl.com"
},
{
"url": "https://*.cloudflarestorage.com"
},
+2 -2
View File
@@ -50,7 +50,7 @@ export const webDownload = async (downloadUrl: string, onProgress?: ProgressHand
const totalSize = parseInt(contentLength, 10);
let receivedSize = 0;
const reader = response.body!.getReader();
const chunks: Uint8Array<ArrayBuffer>[] = [];
const chunks: Uint8Array[] = [];
const startTime = Date.now();
while (true) {
@@ -69,7 +69,7 @@ export const webDownload = async (downloadUrl: string, onProgress?: ProgressHand
}
}
return new Blob(chunks);
return new Blob(chunks as BlobPart[]);
};
export const tauriUpload = async (