From 364fe7f6e290a8e803e64cb79af53d191b73afed Mon Sep 17 00:00:00 2001 From: Christian Bastian <80225746+cdb-boop@users.noreply.github.com> Date: Wed, 24 Jul 2024 02:37:09 -0400 Subject: [PATCH] Fixed index bug. --- web/model-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/model-manager.js b/web/model-manager.js index 21218f9..ceb00a3 100644 --- a/web/model-manager.js +++ b/web/model-manager.js @@ -23,7 +23,7 @@ function request(url, options = undefined) { async function loadWorkflow(url) { const uri = (new URL(url)).searchParams.get("uri"); const fileNameIndex = Math.max(uri.lastIndexOf("/"), uri.lastIndexOf("\\")) + 1; - const fileName = uri.substring(0, fileNameIndex); + const fileName = uri.substring(fileNameIndex); const response = await fetch(url); const data = await response.blob(); const file = new File([data], fileName, { type: data.type });