You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
ipfs.files.add(data, [options], [callback])
Where data may be:
a Buffer instance
a Readable Stream
a Pull Stream a Path (caveat: will only work in Node.js)
a URL
an array of objects
Trying to pass a file system path as a string throws an error
Error: first arg must be a buffer, readable stream, an object or array of objects
at Function.promisify (/Users/oli/Code/ipfs/js-ipfs-api/src/files/add.js:34:23)
at Object.add (/Users/oli/Code/ipfs/js-ipfs-api/node_modules/promisify-es6/index.js:32:27)
at Object.<anonymous> (/Users/oli/Code/ipfs/js-ipfs-api/examples/files-api/files-api.js:19:12)
Do I need to update the spec, or fix the implementation?
The text was updated successfully, but these errors were encountered:
What this means is that, yes the docs are wrong for the current implementation but what we would like is to improve the implementation to actually support it. Thanks @olizilla for catching this one :)
The interface spec suggests that from node you can call
ipfs.add
with a Path.https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#add
Trying to pass a file system path as a string throws an error
Do I need to update the spec, or fix the implementation?
The text was updated successfully, but these errors were encountered: