# Upload file to S3 via AWS API gateway

**URL:** <https://forum.inductiveautomation.com/t/upload-file-to-s3-via-aws-api-gateway/67603>\
**Category:** Ignition\
**Created:** [December 14, 2022, 10:45am UTC](https://forum.inductiveautomation.com/t/upload-file-to-s3-via-aws-api-gateway/67603 "2022-12-14T10:45:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gagananandi\_Chavan](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@Gagananandi\_Chavan](https://forum.inductiveautomation.com/u/Gagananandi_Chavan)\
**Post date:** [December 14, 2022, 10:45am UTC](https://forum.inductiveautomation.com/t/upload-file-to-s3-via-aws-api-gateway/67603/1 "2022-12-14T10:45:49Z")

</div>

I am working on task where trying to upload media file to AWS S3 via AWS API gateways.  
For that i am using ignition provided system.net.httpPut() method.

filedata = event.file.getBytes()  
response = system.net.httpPut(url, putData =filedata)  
url variable having bucket & filename as queryParameter  
this works for .jsp file but doesnt work for other media file.

Have anyone tried successful upload and download of files? if yes , please give suggestions/guidance

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 14, 2022, 5:47pm UTC](https://forum.inductiveautomation.com/t/upload-file-to-s3-via-aws-api-gateway/67603/2 "2022-12-14T17:47:23Z")

</div>

If it works for one filetype but not others, it might be due to a content type mismatch?  
I would recommend migrating to system.net.httpClient, which will be more performant and give you more useful error conditions back.
