Skip to content
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
@sreeharshar84

Description

@sreeharshar84

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:

Severity:

Description:

Steps to reproduce the error:

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood issue for new contributorshelp wantedSeeking public contribution on this issuekind/bugA bug in existing code (including security flaws)topic/docsDocumentation

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions