diff --git a/packages/util/src/index.ts b/packages/util/src/index.ts index 0f0756e7cb3..366c0307f64 100644 --- a/packages/util/src/index.ts +++ b/packages/util/src/index.ts @@ -106,6 +106,7 @@ export const downloadWithProgress = async ( cb?: ProgressCallback ): Promise => { const resp = await fetch(url); + const fallback = resp.clone(); let buf; try { @@ -143,7 +144,7 @@ export const downloadWithProgress = async ( } catch (e) { console.log(`failed to send download progress event: `, e); // Fetch arrayBuffer directly when it is not possible to get progress. - buf = await resp.arrayBuffer(); + buf = await fallback.arrayBuffer(); cb && cb({ url,