# files/v3/files error

**URL:** <https://community.hubspot.com/t/files-v3-files-error/38515>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [June 7, 2021, 10:49pm UTC](https://community.hubspot.com/t/files-v3-files-error/38515 "2021-06-07T22:49:19Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![CRedmon](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/credmon/32/44934_2.png) [@CRedmon](https://community.hubspot.com/u/CRedmon)\
**Post date:** [June 9, 2021, 12:02pm UTC](https://community.hubspot.com/t/files-v3-files-error/38515/6 "2021-06-09T12:02:44Z")

</div>

@tjoyce Hi! I am not a php developer but after looking at your post I did some digging and found what I was missing. In my form body I was missing another parameter on the file property to pass the filename (hence my error).

For all the nodejs devs out there:

```lia-code-sample
const bodyFormData = new FormData();
 bodyFormData.append("file", file.content, { filename: file.filename });
 bodyFormData.append("folderPath", folderPath);
 bodyFormData.append(
 "options",
 JSON.stringify({
 access: "PRIVATE",
 overwrite: true,
 duplicateValidationStrategy: "NONE",
 duplicateValidationScope: "EXACT_FOLDER",
 })
 );

 return _api
 .post("/files/v3/files", bodyFormData, {
 headers: {
 Authorization: `Bearer ${token}`,
 ...bodyFormData.getHeaders(),
 },
 })
 .then(({ data }) => data)
 .catch(e => {
 console.log(e);
 throw new Error(
 `Failed getting creating file ${e.response?.status} - ${e.response?.statusText} - ${e.response?.data?.message}`
 );
 });

```

---

_[View the full topic](https://community.hubspot.com/t/files-v3-files-error/38515)._
