Hey there , I just found out about IPFS so I was testing IPFS using ipfs-http-client.
I found a below test case in js-ipfs:
it('should get with a base58 encoded multihash', async () => {
const files = await all(ipfs.get(fixtures.smallFile.cid))
expect(files).to.be.length(1)
expect(files[0].path).to.eql(fixtures.smallFile.cid)
expect(uint8ArrayToString(uint8ArrayConcat(await all(files[0].content)))).to.contain('Plz add me!')
})
here It is getting data inside files[0].content
, but if i do the same in ipfs-http-client using:
const hashValue = await lms.getHash.call(id); // smart contract gets you CID
const data = await all(ipfs.get(`${hashValue}`));
console.log(data);
I get the value inside data variable if I remove ‘it-all’ library (all), But with it, there is no logs in console.
It’s kind of confusing to me. Please any assist would be helpful. Am I missing something ? Thankyyou