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

ipfs.addPullStream() wont pull #26

Closed
olizilla opened this issue Apr 19, 2018 · 1 comment
Closed

ipfs.addPullStream() wont pull #26

olizilla opened this issue Apr 19, 2018 · 1 comment
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@olizilla
Copy link

In the following code, the pull.map callback is called, but pull.collect never does.

        const ipfsStream = ipfs.files.addPullStream()
        pull(
          pull.values([{content: buffer, path: `/${file.name}`}]),
          pull.map(x => {
            console.log(x)
            return x
          }),
          ipfsStream,
          pull.collect((err, values) => {
            console.log('pull stream res', {err, values})
          })
        )
@alanshaw alanshaw added the kind/bug A bug in existing code (including security flaws) label Apr 19, 2018
@alanshaw
Copy link
Contributor

alanshaw commented Apr 20, 2018

This was fixed by 9884f7c here and by ipfs/ipfs-companion#465 in companion.

There is a further issue when using addPullStream when the content property is a pull stream. Relevant issues and PRs:

js-ipfs-api issue ipfs-inactive/js-ipfs-http-client#745 and PR ipfs-inactive/js-ipfs-http-client#746

js-ipfs issue ipfs/js-ipfs#1317 and PR ipfs/js-ipfs#1319

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants