Running a Startup on AWS? Get Funding With AWS JumpStart. Click Here to Learn More

2021 Fillmore Street #1128

}

24/7 solutions

AllCode NFT Pinata IPFS

How to Upload NFT Content to IPFS via Pinata

The easiest way to upload your content to IPFS is to make use of Pinata. Not only does Pinata enable you to easily place a file onto your own IPFS account, Pinata also provides you with other handy features so you don't have to become an IPFS expert.

Uploading your NFT content to IPFS leveraging Pinata

This is part of a three step tutorial on minting NFTs on Flow. The steps to this tutorial are:

Before you mint an NFT, you’ll want to upload the file to the InterPlanetary File System (IPFS). In general, blockchains do not store large quantities of data well. Instead of storing the content of your image or video into the blockchain, you’ll want to store the content on IPFS, and provide the hash to your content in the metadata of the NFT token.

When you add a file to IPFS, the file is split into smaller chunks, which are cryptographically hashed, and given a unique fingerprint called the Content Identifier (CID). When someone goes to access your file via IPFS, they lookup this unique fingerprint. The lookup process will access their peer IPFS nodes to see whether they have access to the CID. Once IPFS finds the CID, then the file will be downloaded for use.

The easiest way to upload your content to IPFS is to make use of Pinata. Not only does Pinata enable you to easily place a file onto your own IPFS account, Pinata also provides you with other handy features so you don’t have to become an IPFS expert, e.g. a Fast Global CDN, IPFS Gateway, etc.

After you sign up for Pinata, upload the file that you’d like to mint as an NFT. Once you’ve uploaded your file, copy the CID to your clipboard.

AllCode NFT Pinata NFT 2

When you mint your NFT token, you will store the CID into the metadata of the token like the example below. 

let metadata : {String : String} = {
          "name": "AllCode Logo",
          "street_address": "Fillmore Street", 
          "phone_number": "415-890-6431", 
          "email": "[email protected]",
          "uri": "ipfs://QmVH5T7MFVU52hTfQdWvu73iFPEF3jizuGfyVLccTmBCX2"
      }

 The NFT doesn’t actually store the image or video on the blockchain. Instead the wallet which renders the NFT will communicate with the smart contract to acquire the uri of the NFT. The wallet will then query IPFS for the file that resides at the uri. The wallet will render the file that resides at the IPFS uri. 

In our next tutorial, we’ll deploy the contract to the Flow Emulator and verifying that the NFT has been minted correctly with the correct content.

 

allcode_admin
allcode_admin

Related Articles

Managed Container Apps Effortlessly with AWS App Runner

Managed Container Apps Effortlessly with AWS App Runner

Amazon also supports the construction of web applications among other types of projects and solutions on their platform. Even with less experience, users are given a reliable platform for running containers or applications securely and at scale. AWS App Runner is capable of adjusting to the needs of the application whether it be compliance, the scale it needs to operate at, and latency.

How to Setup AWS Control Tower in Your Environment

How to Setup AWS Control Tower in Your Environment

High control and governance is a large focal point of Amazon’s Cloud services. Another solid service for maintaining the wellbeing and compliance of any AWS service is Control Tower, helping to further simplify governance with enough room to integrate third-party software for scaling. AWS Control Tower main function is for the construction and monitoring of new AWS environments regardless of size and complexity.

Get Marketing Help Through AWS’ Marketing Central

Get Marketing Help Through AWS’ Marketing Central

The most important step in marketing is the first step: gathering the data needed. Anything gathered during this phase will dictate everything from what is developed and how it is marketed. Having the right sponsorship and resources can significantly improve this process. Amazon’s Marketing Partner Network, a resource sponsorship program, helps to gather data on target customers and accelerate the process with additional AWS resources, tools, and ML training.

Download our 10-Step Cloud Migration ChecklistYou'll get direct access to our full-length guide on Google Docs. From here, you will be able to make a copy, download the content, and share it with your team.