# File is undefined in form data postman

**URL:** <https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486>\
**Category:** Help Hub\
**Tags:** request, form-data, request-body\
**Created:** [April 30, 2024, 12:14pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486 "2024-04-30T12:14:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![technical-physicist2](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@technical-physicist2](https://community.postman.com/u/technical-physicist2)\
**Post date:** [April 30, 2024, 12:14pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/1 "2024-04-30T12:14:05Z")

</div>

**The bug:**  
file is undefined in form data postman.

 ![1](https://us1.discourse-cdn.com/getpostman/original/3X/d/2/d2690d572bd3f6b09ba3e45e9a5e72bef7401647.jpeg)

and sometimes i got this error “Form param `file`, file load error: PPERM: insecure file access outside working directory” from the postman’s console

**i’ve done**  
**1. add this code in my express js code**

app.use(express.json());  
or the body-parser package

i’ve also tried using another api url made with golang (the api was working fine in my friend’s computer) but still doesn’t work in mine.

**2. switch this setting and change the directory.**  
 ![2](https://us1.discourse-cdn.com/getpostman/original/3X/a/1/a181f925f0cef7bcc1ade042b0c8e2b6ce3fc9f8.jpeg)

the request body from postman form data file is still undefined

**App information**  
postman 10.24.24  
windows 10

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [April 30, 2024, 1:29pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/2 "2024-04-30T13:29:19Z")

</div>

Hi @technical-physicist2. Welcome to the Postman Community!

There is a warning icon to the left of the uploaded file in your screenshot. What do you see when you hover on this warning icon?

---

<div class="post-metadata">

**Author:** ![technical-physicist2](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@technical-physicist2](https://community.postman.com/u/technical-physicist2)\
**Post date:** [April 30, 2024, 4:33pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/3 "2024-04-30T16:33:15Z")

</div>

Sorry for the late reply.

here’s the warning  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/c/6/c66f6159e27b0dd50adb2278d45625bda83a3626.png)

i did upload the file and still got undefined

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/1/c/1c1c1300f8d9175d4604c65a2e15d14df5e53231.png)

thanks

---

<div class="post-metadata">

**Author:** ![technical-physicist2](https://avatars.discourse-cdn.com/v4/letter/t/85f322/32.png) [@technical-physicist2](https://community.postman.com/u/technical-physicist2)\
**Post date:** [May 2, 2024, 9:00am UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/4 "2024-05-02T09:00:31Z")

</div>

i just didn’t realize that the key from form data was not matched.

it seems like the file request body on console postman will be always undefined. So the file is sent to the BE even though the file on postman’s console is undefined.

i’m so sorry for making this topic, it was a human error. 😅

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [May 2, 2024, 1:44pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/5 "2024-05-02T13:44:38Z")

</div>

Haha. Human errors are humorous.

I’m glad you’ve been able to resolve the issue!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [May 5, 2024, 1:45pm UTC](https://community.postman.com/t/file-is-undefined-in-form-data-postman/60486/6 "2024-05-05T13:45:06Z")

</div>

Closed on May 5, 2024, 1:45pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
