upload fix
This commit is contained in:
parent
4f4c817276
commit
c57fea80eb
@ -306,7 +306,10 @@ class GatewayUI {
|
|||||||
// Set timeout (10 minutes for large files)
|
// Set timeout (10 minutes for large files)
|
||||||
xhr.timeout = 600000;
|
xhr.timeout = 600000;
|
||||||
|
|
||||||
// Set headers
|
// Open connection FIRST
|
||||||
|
xhr.open(options.method || 'GET', url);
|
||||||
|
|
||||||
|
// Set headers AFTER opening
|
||||||
Object.entries(options.headers || {}).forEach(([key, value]) => {
|
Object.entries(options.headers || {}).forEach(([key, value]) => {
|
||||||
xhr.setRequestHeader(key, value);
|
xhr.setRequestHeader(key, value);
|
||||||
});
|
});
|
||||||
@ -319,7 +322,6 @@ class GatewayUI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send request
|
// Send request
|
||||||
xhr.open(options.method || 'GET', url);
|
|
||||||
xhr.send(options.body);
|
xhr.send(options.body);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user