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
+1 -1
View File
@@ -20,7 +20,7 @@ if _sys_path_root not in sys.path:
sys.path.insert(0, _sys_path_root)
# Версия приложения (меняется при изменениях)
VERSION = "0.0.42"
VERSION = "0.0.43"
def create_app():
+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);
});