v1.0.22: чистая загрузка — без retry, timeout 120s
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<body>
|
||||
<div class="topbar">
|
||||
<img src="/nubes-logo.svg" alt="Nubes">
|
||||
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.21 — Lucee</span></span>
|
||||
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.22 — Lucee</span></span>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
@@ -232,8 +232,6 @@ uploadBtn.addEventListener('click', function() {
|
||||
if (i >= fileQueue.length) {
|
||||
uploadTimer.style.display = 'none';
|
||||
uploadBtn.disabled = false;
|
||||
document.getElementById('actionsCard').style.display = 'block';
|
||||
document.getElementById('chatCard').style.display = 'block';
|
||||
return;
|
||||
}
|
||||
var f = fileQueue[i];
|
||||
@@ -249,6 +247,7 @@ uploadBtn.addEventListener('click', function() {
|
||||
if (contractId) fd.append('contract_id', contractId);
|
||||
|
||||
xhr.open('POST', '/upload.cfm');
|
||||
xhr.timeout = 120000;
|
||||
xhr.upload.onprogress = function(e) {
|
||||
if (e.lengthComputable) {
|
||||
f.status = Math.round(e.loaded / e.total * 100) + '%';
|
||||
@@ -278,6 +277,12 @@ uploadBtn.addEventListener('click', function() {
|
||||
renderTable();
|
||||
uploadNext(i + 1);
|
||||
};
|
||||
xhr.ontimeout = function() {
|
||||
f.status = 'error';
|
||||
log('❌ ' + f.name + ': таймаут');
|
||||
renderTable();
|
||||
uploadNext(i + 1);
|
||||
};
|
||||
xhr.send(fd);
|
||||
}
|
||||
uploadNext(0);
|
||||
|
||||
Reference in New Issue
Block a user