rust-ipfs-api icon indicating copy to clipboard operation
rust-ipfs-api copied to clipboard

Feature request: allow add, files_write, block_put, … to take AsyncRead or similar

Open jcaesar opened this issue 5 years ago • 2 comments

The title actually says it all, but: Various getters return asynchronous streams (async_ftp::FtpSream::retr in my case, but so does e.g. cat — seems unfair to return something the library itself doesn't accept), and those cannot be easily passed to functions like add. Buffering in memory or temporary files may be expensive or even infeasible, depending on the size.

So it would be nice if some form of async stream could be passed to add and friends.

(This requires changes to rust-multipart-rfc7578, I think. I hope not to hyper, too?)

jcaesar avatar Aug 04 '20 11:08 jcaesar

I currently buffer big video files in my app. I would definitely appreciate more asynchrony.

+1 from me!

SionoiS avatar Aug 04 '20 13:08 SionoiS

https://github.com/cetra3/mpart-async/

Would it be useful? I'm not familiar with that kind of stuff.

SionoiS avatar Aug 26 '20 17:08 SionoiS