v1.0.27: задержка 300ms между загрузками

This commit is contained in:
2026-06-18 19:54:50 +04:00
parent 3489058ec2
commit fb8b53eed1
+3 -4
View File
@@ -64,7 +64,7 @@
<body> <body>
<div class="topbar"> <div class="topbar">
<img src="/nubes-logo.svg" alt="Nubes"> <img src="/nubes-logo.svg" alt="Nubes">
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.26 — Lucee</span></span> <span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.27 — Lucee</span></span>
</div> </div>
<div class="content"> <div class="content">
@@ -247,7 +247,6 @@ uploadBtn.addEventListener('click', function() {
var reader = new FileReader(); var reader = new FileReader();
reader.onload = function(e) { reader.onload = function(e) {
// data:application/pdf;base64,xxxx → xxxx
var b64 = e.target.result.split(',')[1]; var b64 = e.target.result.split(',')[1];
var payload = {filename: f.name, data: b64}; var payload = {filename: f.name, data: b64};
if (contractId) payload.contract_id = contractId; if (contractId) payload.contract_id = contractId;
@@ -269,11 +268,11 @@ uploadBtn.addEventListener('click', function() {
log('❌ ' + f.name + ': ' + (r.ERROR || '')); log('❌ ' + f.name + ': ' + (r.ERROR || ''));
} }
renderTable(); renderTable();
uploadNext(i + 1); setTimeout(function() { uploadNext(i + 1); }, 300);
}).catch(function(e) { }).catch(function(e) {
f.status = 'error: ' + e.message; f.status = 'error: ' + e.message;
renderTable(); renderTable();
uploadNext(i + 1); setTimeout(function() { uploadNext(i + 1); }, 300);
}); });
}; };
reader.onerror = function() { reader.onerror = function() {