webdav-client icon indicating copy to clipboard operation
webdav-client copied to clipboard

Streams support in the browsers

Open baybal opened this issue 3 years ago • 5 comments

Stream support in chrome been there for many years already (the reason YouTube is working there.)

https://developer.mozilla.org/en-US/docs/Web/API/Streams_API

Would you be open to the idea to make createReadStream and createWriteStream use streams API in the browser?

baybal avatar Feb 17 '22 21:02 baybal

I'd absolutely be open to this.. it was the eventual intention. I'd happily accept a PR. I'd get to it eventually but not sure how long that might be 😅

perry-mitchell avatar Feb 18 '22 17:02 perry-mitchell

I researched streams a bit, and it seems the only way to use them is to switch to fetch instead of XHR

baybal avatar Feb 21 '22 11:02 baybal

I had planned to switch to fetch over axios/XHR, so I wouldn't rule this out.

If you feel like contributing I would consider a PR that:

  • Switches axios => fetch
  • Implements streams

perry-mitchell avatar Feb 21 '22 18:02 perry-mitchell

So what's the progress? Will this feature be implemented in a short time? I'm looking forward to it!!!

jiwangyihao avatar Dec 10 '22 06:12 jiwangyihao

The new v5 pre-release is now out, which uses fetch (being required for streams as mentioned above), so I think this could go ahead now.

I'd accept a PR, but I'll also get around to this when I'm able.

perry-mitchell avatar Dec 11 '22 07:12 perry-mitchell