From c3d891f7b7f9107af672c183a6573b2f7608f6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Thu, 18 Jun 2026 08:14:18 +0400 Subject: [PATCH] =?UTF-8?q?v3.1.1:=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B5=D1=80?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=BA=D0=B5=20(=E2=86=91=2012.3=D1=81=2045%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/templates/upload.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/site/templates/upload.html b/site/templates/upload.html index eac9241..6eda210 100644 --- a/site/templates/upload.html +++ b/site/templates/upload.html @@ -59,7 +59,7 @@
Nubes - Сверка договоров v3.0.1 + Сверка договоров v3.1.1
@@ -159,6 +159,7 @@ function uploadFile(file, onProgress) { return new Promise(function(resolve, reject) { + var startTime = Date.now(); var fd = new FormData(); fd.append('files', file); if (contractId) fd.append('cid', contractId); @@ -167,7 +168,7 @@ xhr.open('POST', '/'); xhr.upload.onprogress = function(e) { if (e.lengthComputable && onProgress) { - onProgress(Math.round(e.loaded / e.total * 100)); + onProgress({pct: Math.round(e.loaded / e.total * 100), elapsed: (Date.now() - startTime) / 1000}); } }; xhr.onload = function() { @@ -205,8 +206,8 @@ var startTime = Date.now(); try { - var resp = await uploadFile(f, function(pct) { - fileQueue[rowIdx].status = '↑ ' + pct + '%'; + var resp = await uploadFile(f, function(info) { + fileQueue[rowIdx].status = '↑ ' + info.elapsed.toFixed(1) + 'с ' + info.pct + '%'; renderTable(); }); if (resp && resp.contract_id) contractId = resp.contract_id;