---
title: "Discussion on \"Upload a file to Pinata\" | Hashnode"
description: "Discussion on \"Upload a file to Pinata\". Using Next.js"
url: "https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Upload a file to Pinata](https://atoo.hashnode.dev/upload-a-file-to-pinata?utm_source=hashnode&utm_medium=feed)

Using Next.js

Dec 5, 2022 · 6 min read · atoo.hashnode.dev  
Read the article

-   [#pinata](https://hashnode.com/tag/pinata)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#blockchain](https://hashnode.com/tag/blockchain)
-   [#ipfs](https://hashnode.com/tag/ipfs)
-   [#ipfs-pinning](https://hashnode.com/tag/ipfs-pinning)

## Written by

[Atharva Deshpande](https://hashnode.com/@ParZivaL35)

@ParZivaL35 · London, UK

  
[View profile](https://hashnode.com/@ParZivaL35)

Web3 enthusiast

Member @Developer DAO

## Responses 3

Markdown supported · ⌘↵ to post

[Arshil Vahora](https://hashnode.com/@arshil1804)

[Sep 7, 2024](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/66dbf79e530f4456aea8c121)

When you make pinata upload request from frontend it will expose your Pinata keys, right?

[Atharva Deshpande](https://hashnode.com/@ParZivaL35)

[Sep 7, 2024](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/66dbf79e530f4456aea8c121#reply-66dc3ea89bc556614c61fbf8)

Yes that is correct unless you are using nextjs and its server side architecture which then hides the env variables.

[Arshil Vahora](https://hashnode.com/@arshil1804)

[Sep 7, 2024](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/66dbf79e530f4456aea8c121#reply-66dc3f3ab442a1196323579e)

Yes, that was my only doubt. Thanks, great content

[Sharayu Shendre](https://hashnode.com/@quaintrelle7)

[Jun 14, 2024](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/666c3868e9d1b8cdd264fb89)

This saved my day, thanks!

[Atharva Deshpande](https://hashnode.com/@ParZivaL35)

[Jun 14, 2024](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/666c3868e9d1b8cdd264fb89#reply-666c40104ddcc04f45cddd8c)

Glad it helped and also good to know it still works

[Kelly Kim](https://hashnode.com/@kellykim)

[Feb 23, 2023](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/63f7c35f5ebda1e9aa539a69)

So clear and concise. Great job!

[Atharva Deshpande](https://hashnode.com/@ParZivaL35)

[Feb 23, 2023](https://hashnode.com/posts/upload-a-file-to-pinata/638e748d48501f826691d455/comment/63f7c35f5ebda1e9aa539a69#reply-63f7ce6f207712e9dab05302)

Thanks for the feedback !!!
