v2.0.3: таймауты 30s/60s + console.log отладка

This commit is contained in:
2026-06-18 06:40:04 +04:00
parent cb69549803
commit 5e9e754af0
+6 -3
View File
@@ -60,7 +60,7 @@
<body>
<div class="topbar">
<img src="{{ url_for('static', filename='nubes-logo.svg') }}" alt="Nubes">
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v2.0.2</span></span>
<span class="title">Сверка договоров <span style="font-weight:400;color:var(--muted);font-size:12px;">v2.0.3</span></span>
</div>
<div class="content">
@@ -177,12 +177,14 @@
var uploadId = 'u' + Date.now().toString(36) + Math.random().toString(36).substr(2, 7);
var done = 0;
console.log('uploadFileChunked: ' + file.name + ' b64=' + b64.length + ' chunks=' + totalChunks + ' uploadId=' + uploadId);
function sendChunk(i) {
if (i >= totalChunks) {
console.log('finalize: ' + uploadId);
var xhr = new XMLHttpRequest();
xhr.open('POST', '/v2/finalize');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.timeout = 15000;
xhr.timeout = 60000;
xhr.onload = function() {
try {
var r = JSON.parse(xhr.responseText);
@@ -196,10 +198,11 @@
return;
}
var piece = b64.substring(i * CHUNK, (i + 1) * CHUNK);
console.log('chunk ' + i + '/' + totalChunks + ' send ' + piece.length + ' bytes');
var xhr = new XMLHttpRequest();
xhr.open('POST', '/v2/chunk');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.timeout = 10000;
xhr.timeout = 30000;
xhr.onload = function() {
if (xhr.status === 200) {
try {