This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
Issue with example for ipfs add #3740
Labels
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
topic/docs
Documentation
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
}
*/
Severity:
Description:
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: