From b013c79190b4a6f83227bc45a6eb6b854b3bbfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Thu, 25 Jun 2026 10:08:16 +0400 Subject: [PATCH] =?UTF-8?q?v1.0.178:=20fix=20unzip=20=E2=80=94=20xhr.send(?= =?UTF-8?q?file)=20=E2=86=92=20FormData.=20=D0=91=D1=8D=D0=BA=D0=B5=D0=BD?= =?UTF-8?q?=D0=B4=20=D0=B6=D0=B4=D1=91=D1=82=20multipart=20(=D0=B8=D1=89?= =?UTF-8?q?=D0=B5=D1=82=20\r\n\r\n=20+=20PK=20magic),=20=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D1=81=D1=8B=D1=80=D0=BE=D0=B9=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/files.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/files.js b/deploy/files.js index 79b14e3..7da51bd 100644 --- a/deploy/files.js +++ b/deploy/files.js @@ -312,7 +312,7 @@ async function addZipFile(file) { render(state); try { - // Отправить ZIP на бэкенд + // Отправить ZIP на бэкенд (multipart — бэкенд ищет boundary + PK magic) var zipResp = await new Promise(function(resolve, reject) { var xhr = new XMLHttpRequest(); xhr.open('POST', UNZIP_URL); @@ -321,7 +321,9 @@ async function addZipFile(file) { xhr.onerror = function() { reject(new Error('Сеть')); }; xhr.ontimeout = function() { reject(new Error('Таймаут')); }; xhr.timeout = 60000; - xhr.send(file); + var fd = new FormData(); + fd.append('files', file); + xhr.send(fd); }); if (!zipResp.ok || !zipResp.files) throw new Error('unzip failed');