From 086c46f8e6611658f14c58eb8c071b81c282eec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Tue, 23 Jun 2026 08:45:59 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.127:=20ZIP=20=E2=80=94=20XHR.send(file)=20?= =?UTF-8?q?instead=20of=20fetch,=20same=20pattern=20as=20working=20uploads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.cfm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/index.cfm b/index.cfm index 9add834..1e8f83b 100644 --- a/index.cfm +++ b/index.cfm @@ -75,7 +75,7 @@
Nubes - Сверка договоров — LLM AI-driven Event Sourcing v1.0.126 — Lucee + Сверка договоров — LLM AI-driven Event Sourcing v1.0.127 — Lucee
@@ -259,12 +259,17 @@ fileInput.addEventListener('change', async function() { renderTable(); try { - var zipResp = await fetch(UNZIP_URL, { - method: 'POST', - body: f, - headers: {'Content-Type': 'application/zip'} + var zipResp = await new Promise(function(resolve, reject) { + var xhr = new XMLHttpRequest(); + xhr.open('POST', UNZIP_URL); + xhr.responseType = 'json'; + xhr.onload = function() { resolve(xhr.response); }; + xhr.onerror = function() { reject(new Error('Сеть')); }; + xhr.ontimeout = function() { reject(new Error('Таймаут')); }; + xhr.timeout = 60000; + xhr.send(f); }); - var zipData = await zipResp.json(); + var zipData = zipResp; if (!zipData.ok || !zipData.files) throw new Error('unzip failed'); // Убрать строку ZIP из таблицы