This repository was archived by the owner on Aug 12, 2020. It is now read-only.
hash field missing in files but present for directories #189
Labels
kind/question
A question or request for support
Question
Sample code - https://github.com/ipfs/js-ipfs/blob/master/src/core/components/files.js#L87
Following list of objects is returned.
The hash field is present only for directories (https://github.com/ipfs/js-ipfs-unixfs-engine/blob/master/src/exporter/dir-flat.js#L17) but not for files. Is this intended behaviour?
Happened to look in this code while trying to understand how
js-ipfs files cat
works as part of investigation to implementjs-ipfs files ls
command (ipfs/js-ipfs#927).Adding a
hash: node.multihash
here https://github.com/ipfs/js-ipfs-unixfs-engine/blob/master/src/exporter/file.js#L43 would do the trick.The text was updated successfully, but these errors were encountered: