js-cluster-client icon indicating copy to clipboard operation
js-cluster-client copied to clipboard

addFromFS

Open obo20 opened this issue 5 years ago • 5 comments

An addFromFs functionality would be very useful (similar in functionality to the addFromFS functionality from the js-ipfs-http-client: https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/FILES.md#addfromfs

I'm not sure how challenging this would be as I haven't dove too much into this library's codebase, but having the ability to add directories directly to cluster (though something like this) would be awesome.

obo20 avatar Jul 23 '19 16:07 obo20

Seems like it can be done, but that would need me to poke into the Ipfs http endpoints. @hsanjuan what are your thoughts? Should we do that?

vasa-develop avatar Jul 24 '19 03:07 vasa-develop

What's your usecase @obo20 ? Thinking this library is mostly for use in browser environments and in that case I'm not sure addFromFS helps. Do you have server-side javascript that you would use this with?

hsanjuan avatar Jul 24 '19 12:07 hsanjuan

@hsanjuan @vasa-develop The use case is for nodeJS environments, but upon further research it appears that I can just use the IPFS proxy functionality of IPFS-cluster to accomplish this. As such I wouldn't consider this issue super urgent. More of a nice to have.

obo20 avatar Jul 24 '19 19:07 obo20

It should not be difficult to get, there are no differences on how files/folders are sent to ipfs and cluster (only perhaps the query options of the request and the response type). @vasa-develop I think it's worth having.

hsanjuan avatar Jul 25 '19 09:07 hsanjuan

@hsanjuan on it.

vasa-develop avatar Jul 25 '19 13:07 vasa-develop