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
Description
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