chore: allow download url for installers (#1437)
This commit is contained in:
@@ -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"
|
||||
},
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user