# is it possible to add files to a wix database using "http-functions.js" to add files to a database row when receiving a POST request?

**URL:** <https://forum.wixstudio.com/t/is-it-possible-to-add-files-to-a-wix-database-using-http-functions-js-to-add-files-to-a-database-row-when-receiving-a-post-request/28334>\
**Category:** Ask the community\
**Tags:** code, question, wix-stores\
**Created:** [April 6, 2020, 5:43pm UTC](https://forum.wixstudio.com/t/is-it-possible-to-add-files-to-a-wix-database-using-http-functions-js-to-add-files-to-a-database-row-when-receiving-a-post-request/28334 "2020-04-06T17:43:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikebutrico96](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mikebutrico96/32/10915_2.png) [@mikebutrico96](https://forum.wixstudio.com/u/mikebutrico96)\
**Post date:** [April 6, 2020, 5:43pm UTC](https://forum.wixstudio.com/t/is-it-possible-to-add-files-to-a-wix-database-using-http-functions-js-to-add-files-to-a-database-row-when-receiving-a-post-request/28334/1 "2020-04-06T17:43:01Z")

</div>

I have created a database on Wix which has text columns and also one column to store images, and one for files.  
I saw that wix supports the possibility to create backend functions that make it possible to add elements to a database when receiving http calls such as POST and GET.  
I would like to create a new row in the database once a POST request is received with a pdf file (for example) and some images (and store these files in the database).  
Does Wix support this use-case?

Thank you for your support

---

<div class="post-metadata">

**Author:** ![jaoshsethna](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/jaoshsethna/32/10710_2.png) [@jaoshsethna](https://forum.wixstudio.com/u/jaoshsethna)\
**Post date:** [April 7, 2020, 11:35am UTC](https://forum.wixstudio.com/t/is-it-possible-to-add-files-to-a-wix-database-using-http-functions-js-to-add-files-to-a-database-row-when-receiving-a-post-request/28334/2 "2020-04-07T11:35:31Z")

</div>

Yup. Its possible if you use the GET, POST functions as you mentioned [https://www.wix.com/corvid/reference/wix-http-functions.html](https://www.wix.com/corvid/reference/wix-http-functions.html) .

Easier if you enable it with tools like zapier, integromat to make it simpler.

---

<div class="post-metadata">

**Author:** ![mikebutrico96](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/mikebutrico96/32/10915_2.png) [@mikebutrico96](https://forum.wixstudio.com/u/mikebutrico96)\
**Post date:** [April 7, 2020, 12:27pm UTC](https://forum.wixstudio.com/t/is-it-possible-to-add-files-to-a-wix-database-using-http-functions-js-to-add-files-to-a-database-row-when-receiving-a-post-request/28334/3 "2020-04-07T12:27:31Z")

</div>

Thanks for the reply,  
I have indeed tried the http-functions and have been able to post text columns into the DB but have not had any luck with files.  
To make sure that I was not writing bad code, i have tried using Postman to send a pdf file into the collection and receive as a response Json error, category USER.  
i am curious to what kind of code i need in my server to make the POST of files and images work.
