Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Issue with how Fixtures get loaded #689

Merged
merged 5 commits into from
Feb 12, 2018
Merged

Issue with how Fixtures get loaded #689

merged 5 commits into from
Feb 12, 2018

Conversation

daviddias
Copy link
Contributor

No description provided.

@daviddias
Copy link
Contributor Author

@daviddias daviddias changed the title Issue with the Buffer browser shim Issue with how Fixtures get loaded Feb 12, 2018
@daviddias
Copy link
Contributor Author

It appears that the real issue is how fixtures get loaded in interface-ipfs-core https://github.com/ipfs/interface-ipfs-core/blob/master/js/src/files.js#L29-L52

aegir makes some hard assumptions on where the fixtures are located https://github.com/ipfs/aegir/blob/master/src/fixtures.js#L18-L22

ipfs-inactive/interface-js-ipfs-core#205 broke that assumption.

@daviddias
Copy link
Contributor Author

daviddias commented Feb 12, 2018

ipfs/aegir#196 & ipfs-inactive/interface-js-ipfs-core#218 are needed to solve this.

@daviddias daviddias merged commit 066988f into master Feb 12, 2018
@daviddias daviddias deleted the buffer-issue branch February 12, 2018 15:56
@ghost ghost removed the in progress label Feb 12, 2018
@musicsmithnz
Copy link

musicsmithnz commented Apr 1, 2018

I found this thread searching for the error "content.once is not a function" which led me to this page.

I'm getting this content.once is not a function error when adding an array of objects to ipfs.files.add.

let ipfsFiles=[]

ipfsFiles.push({
  path: some_path,
  content: some_array_buffer
}); // Add several files like this

ipfs.files.add(
  ipfsFiles,
  (err, files) => {
    if (err) {
      console.log(err)
    } else {
      console.log(files)
    }
  }
)

Am I doing something wrong ? Or is this some issue with ipfs and reading Buffers? I have got this working fine adding single files, but not an Array of files. I could loop through adding files one by one, but I want to be able to add a whole directory with links auto generated by IPFS.

There is a workaround where create a separate webpage and upload individually the hashes I receive back from IPFS.

@x5engine
Copy link

still no fix in 2019, almost 2020 lol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants