Hi!
I’m trying to build an application which can upload data to IPFS, based on this tutorial:
I wrote a function like this:
async function createPost(inputData) { const CID = await ipfs.dag.put({ content: inputData }); return CID; }
I’m getting the error:
TypeError: Cannot read property ‘put’ of undefined
I included ipfs like this: const ipfs = require('ipfs');
Should I start an IPFS node before I try to add files?
I don’t understand how to add files.