diff --git a/site/templates/upload.html b/site/templates/upload.html index 6bf8883..bdadc7f 100644 --- a/site/templates/upload.html +++ b/site/templates/upload.html @@ -60,7 +60,7 @@
Nubes - Сверка договоров v2.0.5 + Сверка договоров v2.0.6
@@ -207,8 +207,8 @@ }).then(function(data) { if (!data.ok) { reject(new Error(data.error)); return; } done++; - if (onProgress) onProgress(Math.round(done / totalChunks * 100)); - setTimeout(function() { sendChunk(i + 1); }, 3000); // дать HTTP/2 стримам закрыться + if (onProgress) onProgress({pct: Math.round(done / totalChunks * 100), done: done, total: totalChunks}); + setTimeout(function() { sendChunk(i + 1); }, 2500); // дать HTTP/2 стримам закрыться }).catch(function(e) { reject(e); }); } sendChunk(0); @@ -241,8 +241,8 @@ var startTime = Date.now(); try { - var resp = await uploadFileChunked(f, contractId, function(pct) { - fileQueue[rowIdx].status = '↑ ' + pct + '%'; + var resp = await uploadFileChunked(f, contractId, function(info) { + fileQueue[rowIdx].status = '↑ чанк ' + info.done + '/' + info.total + ' (' + info.pct + '%)'; renderTable(); }); // uploadFileChunked10k: прогресс по чанкам