addFile in @helia/unixfs doesn't respect the path and field and wrapWithDirectory
option
#707
Labels
kind/bug
A bug in existing code (including security flaws)
Bug
When adding a file (with a browser File object) as follows:
The returned CID is a raw CID and neither
path
norwrapWithDirectory
are used to wrap the file in a dag-pb UnixFS directory.Reproduction
https://codepen.io/2color/pen/zxONqPj
Relevant code paths in helia and js-ipfs-unixfs
helia/packages/unixfs/src/commands/add.ts
Lines 46 to 53 in 3423750
https://github.com/ipfs/js-ipfs-unixfs/blob/bf060cda444221225675663e2a760ef562437963/packages/ipfs-unixfs-importer/src/index.ts#L383-L391
https://github.com/ipfs/js-ipfs-unixfs/blob/bf060cda444221225675663e2a760ef562437963/packages/ipfs-unixfs-importer/src/index.ts#L383-L391
The text was updated successfully, but these errors were encountered: