You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, this will be quiet important. Especially not being able to download directory in browser is quite problematic.
Upon some research, there is support for streams in a browser using readable-stream. I will try to make an initial PR that will implement this package for using downloadObservable and downloadDirectory for browser as well.
Do you think there is still some more API to be implemented in browsers? I think the only "node" specific APIs are those related to FS, which won't be ever implemented browser...
I was mostly thinking about supporting APIs that are available in the browser but AFAIK not in node, such as Blob, File, FileList and ReadableStream.
For example we could have a downloadBlob() function, uploadFile() could accept File and ReadableStream as inputs and uploadDirectory() could accept a FileList input, that would make it very simple to upload the contents of an <input type="file"> to Swarm.
Basically the same way the node-specific APIs make it easy to interact with the local FS, I think browser-specific APIs could be used to support higher-level application use cases.
Ideally matching the node ones as much as possible, but supporting browser APIs such as Blob, FileReader, etc.
The text was updated successfully, but these errors were encountered: