From @fullmetal1 on Mon May 15 2017 04:28:23 GMT+0000 (UTC)
The current documents (https://github.com/ipfs/interface-ipfs-core/tree/master/API/files#add) mention a data array, with two elements. A ‘path’, and ‘content’. I want to know what the purpose of feeding a path to ipfs is when it has the file contents in the content object. I also want to know how I can use ipfs.files.add without the need for Node.js, since both Buffer and readable streams (AFAIK) are Node.js object types.
More to the point, I have a function in a webapp (client side, only html + js) with access to an ArrayBuffer variable that contains a files contents, as well as the filename for the file. What should I do to make ipfs.files.add work with what I have?
Copied from original issue: https://github.com/ipfs/faq/issues/257