perry-mitchell / webdav-client

WebDAV client written in Typescript for NodeJS and the browser
MIT License
661 stars 143 forks source link

Streams support in the browsers #292

Open baybal opened 2 years ago

baybal commented 2 years ago

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?

perry-mitchell commented 2 years ago

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 😅

baybal commented 2 years ago

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

perry-mitchell commented 2 years ago

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:

jiwangyihao commented 1 year ago

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

perry-mitchell commented 1 year ago

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.