fix timeout with remote
f
This commit is contained in:
parent
c6856da247
commit
a0097dc3ce
1 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,9 @@ export function makeUploadRequest(
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', ENDPOINT);
|
xhr.open('POST', ENDPOINT);
|
||||||
xhr.setRequestHeader(X_LBRY_AUTH_TOKEN, token);
|
xhr.setRequestHeader(X_LBRY_AUTH_TOKEN, token);
|
||||||
xhr.timeout = PUBLISH_FETCH_TIMEOUT_MS;
|
if (!remoteUrl) {
|
||||||
|
xhr.timeout = PUBLISH_FETCH_TIMEOUT_MS;
|
||||||
|
}
|
||||||
xhr.responseType = 'json';
|
xhr.responseType = 'json';
|
||||||
xhr.upload.onprogress = (e) => {
|
xhr.upload.onprogress = (e) => {
|
||||||
const percentage = ((e.loaded / e.total) * 100).toFixed(2);
|
const percentage = ((e.loaded / e.total) * 100).toFixed(2);
|
||||||
|
|
Loading…
Add table
Reference in a new issue