# Not able to upload file through file API

**URL:** <https://community.hubspot.com/t/not-able-to-upload-file-through-file-api/17133>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [November 11, 2019, 6:36am UTC](https://community.hubspot.com/t/not-able-to-upload-file-through-file-api/17133 "2019-11-11T06:36:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shwetansh07](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shwetansh07/32/97852_2.png) [@Shwetansh07](https://community.hubspot.com/u/Shwetansh07)\
**Post date:** [November 11, 2019, 6:36am UTC](https://community.hubspot.com/t/not-able-to-upload-file-through-file-api/17133/1 "2019-11-11T06:36:38Z")

</div>

When trying to upload file through [https://developers.hubspot.com/docs/methods/files/post\_files](https://developers.hubspot.com/docs/methods/files/post_files) , getting this error again and again :-

```auto
[status_code] => 400
 [response] => {"status":"error","message":"no file found, please set name to 'files' or 'files[]'","correlationId":"339d101e-9be8-4ae9-b367-5f15c2438959","requestId":"0c6332dc-3734-4303-8a50-55631cedbbde"}
 [errors] =>  

```

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [November 12, 2019, 2:30am UTC](https://community.hubspot.com/t/not-able-to-upload-file-through-file-api/17133/2 "2019-11-12T02:30:08Z")

</div>

Hi @Shwetansh07,

Are you using python to upload the file via the API into HubSpot? If so, I believe these few thread discussion here will be helpful for you:

- [https://community.hubspot.com/t5/APIs-Integrations/How-to-upload-a-file-to-HubSpot-API/m-p/240321](https://community.hubspot.com/t5/APIs-Integrations/How-to-upload-a-file-to-HubSpot-API/m-p/240321) (Check out luis\_montes comment)
- [https://stackoverflow.com/questions/53745997/curl-upload-in-php-to-hubspot-no-file-found](https://stackoverflow.com/questions/53745997/curl-upload-in-php-to-hubspot-no-file-found)
