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.
Issue with example for ipfs add #3740
Closed
Description
The example in ipfs.add (https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options) lists the following example.
This is clearly wrong, there is no variable with the name "content"
const file = {
path: '/tmp/myfile.txt',
content: 'ABC'
}
const result = await ipfs.add(content)
console.info(result)
/*
Prints:
{
"path": "tmp",
"cid": CID("QmWXdjNC362aPDtwHPUE9o2VMqPeNeCQuTBTv1NsKtwypg"),
"mode": 493,
"mtime": { secs: Number, nsecs: Number },
"size": 67
}
*/
- Version:
- Platform:
- Subsystem: