This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Update files.add
return format to match js-ipfs-api #247
Closed
Description
The current result format in js-ipfs core is
{
path: 'the original path',
size: (# of bytes of the data),
dataSize: (moar!)
multihash: (a Buffer of the data multihash)
}
as dictated by unixfs-engine. This is different from what the HTTP API returns, which is a lot less information:
{
Name: 'some name',
Hash: 'QmRNjDeKStKGTQXnJ2NFqeQ9oW23WcpbmvCVrpDHgDg3T6'
}
To make interface-ipfs-core consistent, I propose we either
- Modify unixfs-engine to return objects of the latter format, or
- Modify js-ipfs to massage its results from unixfs-engine into the latter format
I prefer (2) personally, since it means other modules can still use unixfs-engine to get a fuller set of data from whatever is imported.
ping @diasdavid @nginnever
Metadata
Metadata
Assignees
Labels
No labels