From a64db2843c0c60e475f21635e1566492bea87ce7 Mon Sep 17 00:00:00 2001 From: JotaChina Date: Wed, 10 Dec 2025 16:45:44 -0300 Subject: [PATCH] tentando resolver problema do download do zip no mmpCreator --- creation.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/creation.html b/creation.html index a7c529d2..cbbf8844 100755 --- a/creation.html +++ b/creation.html @@ -783,9 +783,13 @@ let projectName = params.get("project"); if (projectName) { + // 2. Garante a extensão para a API (opcional, mas seguro) + if (!projectName.toLowerCase().endsWith(".mmp")) { + projectName += ".mmp"; + } // 3. Monta a URL da API Python e inicia o download - const apiUrl = `https://alice.ufsj.edu.br:33002/api/download/${projectName}`; + const apiUrl = `/api/download/${projectName}`; // Feedback visual rápido downloadBtn.style.opacity = "0.5"; @@ -843,7 +847,7 @@ uploadSampleBtn.style.pointerEvents = "none"; try { - const response = await fetch("https://alice.ufsj.edu.br:33002/api/upload/sample", { + const response = await fetch("/api/upload/sample", { method: "POST", body: formData });