From 5d7ffb0cf3a20859c75d120e29c935623f6af119 Mon Sep 17 00:00:00 2001 From: Christian Bastian <80225746+cdb-boop@users.noreply.github.com> Date: Wed, 24 Jul 2024 02:36:35 -0400 Subject: [PATCH] Fixed bug with object key-value. --- web/model-manager.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/model-manager.js b/web/model-manager.js index 513eeae..21218f9 100644 --- a/web/model-manager.js +++ b/web/model-manager.js @@ -23,11 +23,10 @@ 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(fileNameIndex); + const fileName = uri.substring(0, fileNameIndex); const response = await fetch(url); const data = await response.blob(); - const datatype = data.type; - const file = new File([data], fileName, { datatype }); + const file = new File([data], fileName, { type: data.type }); app.handleFile(file); }