I have a long-running fetch process that posts a large file upload and waits for it to return a different large file :
let formData = new FormData();
formData.append('file', new Blob([file.blob], {type: file.type}), file.name);
fetch(someurl, {
method: 'POST',
body: formData
cache: 'no-store'
}).then(response => {
if (!respone.ok) throw(respone.statusText);
return response;
}).then(response => response.blob())
.then(blob => {
... do something
Can I know what part of the process the fetch is up to - Posting the Request or Recieving the Response?
https://fetch.spec.whatwg.org/#fetch-elsewhere-fetch says fetch (js) could implement a processRequestEndOfBody and processResponseEndOfBody but the js implementation (https://fetch.spec.whatwg.org/#dom-global-fetch) doesn't seem to have them. However the chrome network inspector seems to have some clue as to the state of the request/response and I'm wondering if there's a way to glean that information at runtime? Any thoughts/discussion/alternates appreciated.