Fix #29 (for real)

This commit is contained in:
msqr1
2025-04-04 11:19:39 -07:00
parent 006199d103
commit 9e5d039ee5
5 changed files with 172 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@@ -58,7 +58,8 @@ class CommonModel extends EventTarget {
// Caching already handled explicitly
res = await fetch(url, { cache: 'no-store' });
if (!res.ok) throw 'Unable to fetch model, status: ' + res.status;
await cache.put(storepath + '?' + id, new Response(res.body.pipeThrough(new DecompressionStream('gzip'))));
await cache.put(storepath + '?' + id,
new Response(res.clone().body.pipeThrough(new DecompressionStream('gzip'))));
}
else res = await cache.match(req)
let tar = await res.arrayBuffer();