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 Feb 12, 2024. It is now read-only.
According to the API spec, you're supposed to pass a node Buffer, a node Readable stream, or an object containing one of those to the ipfs.files.add method. However, this project advertises the ability to use the implementation by including a <script> tag:
If you do include that tag, you get a global Ipfs object, and you can indeed start up a node and go online. But since in the global namespace there is no Buffer or Readable stream implementation, what are you supposed to pass to ipfs.files.add? It would seem to be requiring types that can't be created outside it's fancy webpack module that hides all the node globals.
The text was updated successfully, but these errors were encountered:
@interfect fair point. Would you like to submit a PR that exposes Buffer under ipfs.Buffer, so that it doesn't force users to bundle Buffer as a separate blob? This will need to be documented.
daviddias
changed the title
API doesn't make sense in the browser
feat: expose Buffer on the dist version
Oct 17, 2016
According to the API spec, you're supposed to pass a node
Buffer
, a nodeReadable
stream, or an object containing one of those to theipfs.files.add
method. However, this project advertises the ability to use the implementation by including a<script>
tag:If you do include that tag, you get a global
Ipfs
object, and you can indeed start up a node and go online. But since in the global namespace there is noBuffer
orReadable
stream implementation, what are you supposed to pass toipfs.files.add
? It would seem to be requiring types that can't be created outside it's fancy webpack module that hides all the node globals.The text was updated successfully, but these errors were encountered: