v0.0.43: таймаут загрузки 30с → 300с (загрузка больших файлов нестабильна через шлюз)

This commit is contained in:
“Naeel”
2026-08-19 14:33:08 +04:00
parent c67fffbc56
commit 70a47ac905
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -393,7 +393,7 @@ async function uploadFiles() {
const url = '/api/upload?_=' + Date.now();
const xhr = new XMLHttpRequest();
xhr.open('POST', url);
xhr.timeout = 30000;
xhr.timeout = 300000; // 300с: загрузка больших файлов нестабильна через шлюз
xhr.upload.onprogress = function(e) {
if (e.lengthComputable) {
const pct = Math.round(e.loaded / e.total * 100);
@@ -417,7 +417,7 @@ async function uploadFiles() {
}
};
xhr.onerror = function() { reject(new Error('Сеть')); };
xhr.ontimeout = function() { reject(new Error('Таймаут 30с')); };
xhr.ontimeout = function() { reject(new Error('Таймаут 300с')); };
activeXHR = xhr;
xhr.send(fd);
});