-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ipfs.files.get and ipfs.files.cat do not support ipfs-path format #837
Comments
I believe that your hash has to be "fully qualified" with |
Nope, even with that I still get this for ipfs.files.get: |
@kyledrake is correct, currently we don't support subpaths, also tracked here #60 @kyledrake would you like to help us achieve that? This would require a modification to the https://github.com/ipfs/js-ipfs-unixfs-engine, it needs to discard part of the tree traversal operations. |
Hi @kyledrake, apologies for the wait here, this took way longer than I would hope for, it was one low hanging fruit item that we left open to welcome contributions, shouldn't have left it open for so long. Now it is done on master, it will come with next release of ipfs or you can use it by git cloning and npm link yourself :) |
Also, this comes with tests and documentation, see: https://github.com/ipfs/interface-ipfs-core/tree/master/API/files#cat :) |
The go-ipfs daemon takes care of this for me (
ipfs cat QmcKi2ae3uGb1kBg1yBpsuwoVqfmcByNdMiZ2pukxyLWD8/index.html
), so I was surprised to run into this.The way it seems to be implemented in js-ipfs is that
ipfs.files.get
can iterate over every "file" and provides an object with a path and stream, but that could have performance implications if we were trying to grab individual objects from larger trees. I don't always want to go through the whole thing.The text was updated successfully, but these errors were encountered: