js-ipfs-utils icon indicating copy to clipboard operation
js-ipfs-utils copied to clipboard

Use `XHR` instead of `fetch` to provide progress updates

Open Gozala opened this issue 4 years ago • 4 comments

fetch API does not provide an API to monitor upload progress which prevents ipfs-webui from reporting any progress on file add.

There are some discussions around making progress observable:

  • https://github.com/whatwg/fetch/issues/21
  • https://github.com/whatwg/fetch/issues/447

It appears that ReadableStreams will at some point provide a way to do that, however no browser supports it today.

In the meantime I'd like to propose using XHR & it's progress events.

Gozala avatar Jul 27 '20 18:07 Gozala