# Files API Uploading Blank Files NodeJS/AWS

**URL:** <https://community.hubspot.com/t/files-api-uploading-blank-files-nodejs-aws/84510>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [June 30, 2023, 6:13pm UTC](https://community.hubspot.com/t/files-api-uploading-blank-files-nodejs-aws/84510 "2023-06-30T18:13:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umstotdl](https://avatars.discourse-cdn.com/v4/letter/u/85f322/32.png) [@umstotdl](https://community.hubspot.com/u/umstotdl)\
**Post date:** [June 30, 2023, 6:13pm UTC](https://community.hubspot.com/t/files-api-uploading-blank-files-nodejs-aws/84510/1 "2023-06-30T18:13:36Z")

</div>

Hi,

I’m trying to write a file upload endpoint in my API gateway. The files seem to be uploading, with the right file size and type but no content. Like a PDF with 3 blank pages, or an image with a broken link. What format am I supposed to be sending file content in? The documentation is very bare and I can’t seem to solve the issue. Currently, it’s sending a Buffer, which the API accepts but clearly doesn’t translate properly.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![MWWesterterp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mwwesterterp/32/19243_2.png) [@MWWesterterp](https://community.hubspot.com/u/MWWesterterp)\
**Post date:** [July 1, 2023, 4:03pm UTC](https://community.hubspot.com/t/files-api-uploading-blank-files-nodejs-aws/84510/2 "2023-07-01T16:03:37Z")

</div>

Hi, i recently experienced something similar. It turned out that the file had the wrong access rights. So we build a workflow to set the acces right to public.

Hopefully this helps.

---

<div class="post-metadata">

**Author:** ![umstotdl](https://avatars.discourse-cdn.com/v4/letter/u/85f322/32.png) [@umstotdl](https://community.hubspot.com/u/umstotdl)\
**Post date:** [July 1, 2023, 4:11pm UTC](https://community.hubspot.com/t/files-api-uploading-blank-files-nodejs-aws/84510/3 "2023-07-01T16:11:57Z")

</div>

I actually figured this out yesterday, it ended up being that my AWS  
serverless function wasn’t outputting binary data. I had to set the  
function to return binary.
