Upload To IPFS Using Pinata
IPFS (The InterPlanetary File System) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system, uploading to IPFS involves using terminal or IPFS desktop app, that where Pinata comes in.
Pinata is a fast and reliable platform to share your NFT, they have different plans ranging from pro, individual and free plan. In this tutorial we are going to be using the free plan which comes with 1 GB of storage, API access, Pinata upload and File manager which we will be using to manage files uploaded. Let get right in. 💌
- Create Account: Visit the Pinata website(https://www.pinata.cloud/) click on Try For Free button which will take you to a registration page, fill all the details. A confirmation code will be sent to your mail, which you will use to confirm your account. You will be redirected to dashboard on successful registration
2. Upload File: Click on the upload button > File > Select File > Enter file name (leave as default) >upload.
On successful upload a success message will display, and the new added file will display in dashboard.
3. File Break Down: Now your file has been fully uploaded clicking on the file name will open the file in new tab, where you will see the newly uploaded file.
CID — hash of the file uploaded (we will be using later)
More — give more controls like edit name, delete file e.t.c
You can now access your new file on IPFS link using https://ipfs.io/ipfs/CID.
Replace the CID with your file CID, congratulations you just uploaded your first file on IPFS.
4. Uploading NFT MetaData: MetaData is a JSON file which allows applications like OpenSea to pull in rich data for digital assets and easily display them in-app. Though different platform have their meta data standard, here is a link to open sea standard (https://docs.opensea.io/docs/metadata-standards), I am going to stick to a smaller metadata. I will call this file “my-screenshot.json”. Upload the meta data on Pinata as file using step 2 as a guide.
// format
{
"name" : // Any name,
"image" : // URL to image on IPFS,
"description": // Some text
}// my-screenshot.json
{
"name" : "My screenshot",
"image" : "https://ipfs.io/ipfs/QmSvzZtYxRVJQFoSeJFn5Uh57iM6yDeAp8RbY6D4BBE5Xq",
"description": "my screenshot of etherscan"
}
5. Congratulations: Now you have uploaded your meta data on Pinata, you can simply add the URL (https://ipfs.io/ipfs/CID) when minting your NFT. 👌
Resources:
https://docs.ipfs.io/how-to/address-ipfs-on-web/#dweb-addressing-in-brief
Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing