mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: add progress bar fix
This commit is contained in:
parent
eab2721f89
commit
a70d0dd088
@ -221,6 +221,7 @@ window.onload = async function()
|
||||
const total = parseInt(contentLength, 10);
|
||||
const reader = resp.body.getReader();
|
||||
let downloaded = 0;
|
||||
let downloadedForProgress = 0;
|
||||
|
||||
const brotli = await brotliCJS.default;
|
||||
const decompStream = new brotli.DecompressStream();
|
||||
@ -248,9 +249,10 @@ window.onload = async function()
|
||||
if ( failed ) {
|
||||
throw new Error('decompression failed', resultCode);
|
||||
}
|
||||
downloadedForProgress += value.byteLength;
|
||||
// uint8arrays.push(value);
|
||||
// downloaded += value.byteLength;
|
||||
// status.phase_progress = downloaded / total;
|
||||
status.phase_progress = downloadedForProgress / total;
|
||||
}
|
||||
// const arrayBuffer = await resp.arrayBuffer();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user