-
Notifications
You must be signed in to change notification settings - Fork 299
block.put ignores CID argument #815
Comments
It looks like the CID is being ignored in https://github.com/ipfs/js-ipfs-api/blob/master/src/block/put.js |
Yes and because of that, the block is being stored under a version 0 CID so you can't get it back using your version 1 CID - which explains the hanging. |
Also, according to the spec the second arg should be an object with a https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md#blockput |
I'd like to give this a try. New here, not sure what the process is for asking to be assigned to an issue. |
@neodon that would be awesome, please send a PR! Would you mind also adding a test to https://github.com/ipfs/interface-ipfs-core/blob/master/js/src/block/put.js for this? You need to use |
@neodon did you get anywhere with this? |
@alanshaw I've spent quite a bit of time digging through the layers in js-ipfs-api and js-ipfs. This last weekend I spent some time going through the go-ipfs implementation to get more context. Any hints or insight would be helpful. I can't seem to determine that js-ipfs actually supports setting a custom cid. |
I took a look -- is the issue just that the CID is not being properly passed in the call of sendOneFile on line 29? Also the need to handle the different possible types of CID objects being passed into the function |
Hello, I'm having an issue where
block.get
is hanging and never returns the block.Here's the example code:
Output
It works using the CLI though:
Any help is appreciated, thanks.
The text was updated successfully, but these errors were encountered: