Skip to content

ETHOnline22/ipfs_upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPFS Upload

This is a PoC consisting of functions to upload a json data to the IPFS using web3.storage.

To run this PoC,

  1. Create a file .env and add a web3.storage token like below,
WEB3_STORAGE_TOKEN={YOUR_TOKEN}
  1. To upload a public address and private data to ipfs, use the below function
const contentURI = await uploadToIPFS({ publicAddress, privateData });

This function will return an IPFS link pointing to a JSON.

  1. To fetch the data from IPFS, use the below function
const data = await retrieveFromIPFS(contentURI);

This will return the json data back by querying the URI

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published