From 14d4a2c623d3fd45a3a52935ca43e16948b75fed Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Mon, 6 Jul 2026 16:13:01 +0200 Subject: [PATCH 1/3] Add `origins` option to `requestFileHandle` --- web/src/artifact_cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/artifact_cache.ts b/web/src/artifact_cache.ts index 092f1fe3ee50..e0ae9e2f7cd8 100644 --- a/web/src/artifact_cache.ts +++ b/web/src/artifact_cache.ts @@ -188,7 +188,7 @@ class CrossOriginStorage { if (!api) { throw new Error("Cross-origin storage API unavailable."); } - const handle = await api.requestFileHandle(hash, { create: true }); + const handle = await api.requestFileHandle(hash, { create: true, origins: "*" }); if (!handle) { throw new Error("Cross-origin storage API returned no handle."); } From 98dd9e8e669efbb00f036249a402a26ee810bc93 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Mon, 6 Jul 2026 16:19:16 +0200 Subject: [PATCH 2/3] Add optional origins parameter to CrossOriginStorageRequestFileHandleOptions --- web/src/artifact_cache.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/artifact_cache.ts b/web/src/artifact_cache.ts index e0ae9e2f7cd8..1f8d3ca8e953 100644 --- a/web/src/artifact_cache.ts +++ b/web/src/artifact_cache.ts @@ -111,6 +111,7 @@ interface CrossOriginStorageHandle { interface CrossOriginStorageRequestFileHandleOptions { create?: boolean; + origins?: string[] | string | undefined; } interface CrossOriginStorageWritable { From cf20d675558bfbbf0e51ba9e691d3c12e12bf0a5 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Sat, 11 Jul 2026 09:03:11 +0200 Subject: [PATCH 3/3] Apply suggestion from @tomayac --- web/src/artifact_cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/artifact_cache.ts b/web/src/artifact_cache.ts index 1f8d3ca8e953..da655da4e317 100644 --- a/web/src/artifact_cache.ts +++ b/web/src/artifact_cache.ts @@ -189,7 +189,7 @@ class CrossOriginStorage { if (!api) { throw new Error("Cross-origin storage API unavailable."); } - const handle = await api.requestFileHandle(hash, { create: true, origins: "*" }); + const handle = await api.requestFileHandle(hash, { create: true, origins: "*" /* All origins */ }); if (!handle) { throw new Error("Cross-origin storage API returned no handle."); }