# Upload to IPFS

## What is IPFS?

In general, blockchains do not store large quantities of data (onchain) because it is quite expensive. Instead of storing the content of your image or video on the blockchain, you’ll want to store the content on IPFS (offchain) to be decentralized, and provide the IPFS URI to your content in the metadata of the NFT token.

The easiest way to upload your content to IPFS is through the use of Pinata, a 3rd party IPFS storage company.

## Pinning Your Collection on Pinata

### Create an 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

<figure><img src="/files/k7h1RTwqxrUseaYyFbBu" alt=""><figcaption></figcaption></figure>

### Upload Files

You can upload either a file or folder containing all your arts.

**For a file:** Click on the upload button > File > Select File > Enter file name > upload.

**For a folder:** Click on the upload button > Folder > Select a folder to upload > Enter folder name > >upload.

On successful upload a success message will display, and the new added file will display in dashboard.

<figure><img src="/files/OsDau9pNaWxZRzwCPQFD" alt=""><figcaption></figcaption></figure>

### Files 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. **You can see on your screen:**

**CID** — hash of the file uploaded (the one we will use for our metadata) **More** — give more controls like edit name, delete file and share.

You can now access your new file on IPFS link using <https://gateway.pinata.cloud/ipfs/CID>.

In case of folders you can now access your new files on IPFS link using <https://gateway.pinata.cloud/ipfs/CID/numberOfFile>.

Replace the CID with your file CID, congratulations you just uploaded your first file on IPFS.

<figure><img src="/files/mRsAimp5cT8YGrjgNtO2" alt=""><figcaption></figcaption></figure>

### NFT MetaData

{% hint style="info" %}
For NFTS - you will have to upload two folders. A folder containing all the jsons metadata of your collection. Another folder containing the images like the picture above.
{% endhint %}

Metadata is a JSON file which allows applications like OpenSea, Rarible and other Marketplace to pull in the data for digital assets and easily display them in-app. Though different platform have their meta data standard, here is a link to [opensea standard](https://docs.opensea.io/docs/metadata-standards).

The metadata should look like this for a single file:

```
{
"name" : // Collection Name
"description": // Description of your collection
"image" : // URL to image on IPFS
}
```

```jsx
{
"name" : "My First Upload",
"description": "my first upload",
"image" : "ipfs://QmYmfHMJiEipeXC94iGHPixR4jcDDUP4CcQNTiFWMk6iNb/1.png"
}
```

### Well done!

You have successfully uploaded your collection to IPFS and are ready to use it in your contract.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.launchifi.xyz/how-to/upload-to-ipfs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
