Answers for "how to get data from ipfs"

1

how to get data from ipfs

//using fetch 
const response = await fetch(ipfs_url);

if(!response.ok)
  throw new Error(response.statusText);

const json = await response.json();

//using ipfs
const ipfs = await IPFS.create();
const result = await ipfs.cat(cid);
Posted by: Guest on March-12-2022

Code answers related to "how to get data from ipfs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language