Increase upload timeout and other fixes
This commit is contained in:
@@ -138,7 +138,10 @@ const stats_update = () => {
|
||||
remaining_time = (elapsed_time/total_progress) - elapsed_time
|
||||
|
||||
// Calculate the rate by comparing the current progress with the last iteration
|
||||
total_rate = (1000 / stats_interval_ms) * (total_loaded - last_total_loaded)
|
||||
total_rate = Math.floor(
|
||||
(total_rate * 0.8) +
|
||||
(((1000 / stats_interval_ms) * (total_loaded - last_total_loaded)) * 0.2)
|
||||
)
|
||||
last_total_loaded = total_loaded
|
||||
|
||||
progress_bar_inner.style.width = (total_progress * 100) + "%"
|
||||
|
@@ -99,7 +99,7 @@ export const start = () => {
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", window.api_endpoint+"/file", true);
|
||||
xhr.timeout = 21600000; // 6 hours, to account for slow connections
|
||||
xhr.timeout = 86400000; // 24 hours, to account for slow connections
|
||||
|
||||
xhr.upload.addEventListener("progress", evt => {
|
||||
if (evt.lengthComputable) {
|
||||
|
Reference in New Issue
Block a user