# How to give variable and path while uploading file in postman?

**URL:** <https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886>\
**Category:** Help Hub\
**Tags:** tests, variables\
**Created:** [May 26, 2020, 2:19pm UTC](https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886 "2020-05-26T14:19:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharat.r](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bharat.r](https://community.postman.com/u/bharat.r)\
**Post date:** [May 26, 2020, 2:19pm UTC](https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886/1 "2020-05-26T14:19:36Z")

</div>

How to give variable and path while uploading file to postman? I want to upload a file automatically so that i can give path and also variable name so it will automatically detect that file and upload directly.

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [May 29, 2020, 2:12am UTC](https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886/2 "2020-05-29T02:12:10Z")

</div>

Edit JSON file of the collection and replace the file path with a Postman variable.

---

<div class="post-metadata">

**Author:** ![bharat.r](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bharat.r](https://community.postman.com/u/bharat.r)\
**Post date:** [June 3, 2020, 9:06am UTC](https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886/3 "2020-06-03T09:06:09Z")

</div>

Thanks a lot  
It works

---

<div class="post-metadata">

**Author:** ![telecoms-physicist-7](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@telecoms-physicist-7](https://community.postman.com/u/telecoms-physicist-7)\
**Post date:** [April 26, 2021, 10:25am UTC](https://community.postman.com/t/how-to-give-variable-and-path-while-uploading-file-in-postman/12886/4 "2021-04-26T10:25:10Z")

</div>

How do you edit the JSON file of the collection? I’m lost as to where to find this in Postman.
