Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Passing a pull-stream to ipfs.add is interpreted as a callback #25

Closed
@olizilla

Description

@olizilla

If you pass a pull-stream to ipfs.add like:

const pullStream = fileReader(file)
const ipfsRef = await ipfs.files.add(pullStream)

It's interpreted as a callback fn and callbackify is invoked, which causes an error in callbackifyVariadic

Type error: cb is not a function

Passing it as part of an array of entires avoids that issue, but then hits a known issue later on

const pullStream = fileReader(file)
const ipfsRef = await ipfs.files.add([{content: pullStream}])
Error: content.once is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions