This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
files.add to object.get to object.put: unexpected EOF #368
Closed
Description
ipfs.add an file, ipfs.object.get the hash, then ipfs.object.put the object. When I try to cat the object I see unexpected EOF
. Am I doing something wrong?
const ipfs = window.IpfsApi();
var bs58 = require('bs58');
// AddFromURL for ease of example but this happens with normal add as well.
// Also tested in node env and with other files, same error.
ipfs.util.addFromURL('https://avatars0.githubusercontent.com/u/2553061', function(err, res) {
console.log(err, res)
var hash = res[res.length-1].path
ipfs.object.get(hash, function(err, object) {
ipfs.object.put(object, function(err, res) {
console.log(err, res)
var objectHash = bs58.encode(object.multihash()).toString()
console.log(objectHash)
// http://localhost:8080/ipfs/QmZE6nF5xV8vnvFM7KB4WLzjdeJsvyfE1aGGm5JpGCRyhJ
// returns internalWebError: unexpected EOF
})
})
})
Metadata
Metadata
Assignees
Labels
No labels