diff --git a/frontend/wasm/src/App.vue b/frontend/wasm/src/App.vue index b76128e..f44a92f 100644 --- a/frontend/wasm/src/App.vue +++ b/frontend/wasm/src/App.vue @@ -46,6 +46,7 @@ import { computed, ref } from 'vue'; import Emulator from "@/components/Emulator.vue"; +import { resolveArtifactUrl } from './utils'; const pickedFile = ref(null); const isLoading = ref(0); @@ -67,11 +68,11 @@ async function parseOptions(params: URLSearchParams) { isLoading.value++; if (params.has("firmware")) { - await loadFileFromURL(params.get("firmware")!); + await loadFileFromURL(resolveArtifactUrl(params.get("firmware")!)); } if (params.has("resources")) { for (const url of params.getAll("resources")) { - const response = await fetch(url); + const response = await fetch(resolveArtifactUrl(url)); const resource = new Uint8Array(await response.arrayBuffer()); initResources.value.push(resource); diff --git a/frontend/wasm/src/utils.ts b/frontend/wasm/src/utils.ts index 13756b1..fd26f3a 100644 --- a/frontend/wasm/src/utils.ts +++ b/frontend/wasm/src/utils.ts @@ -111,3 +111,12 @@ export async function getZipOrNested(data: Uint8Array, maxDepth = 5): Promise