# Uploading Multiple Files to Xano: Solved

**URL:** <https://community.weweb.io/t/uploading-multiple-files-to-xano-solved/590>\
**Category:** How do I?\
**Created:** [May 25, 2022, 2:03am UTC](https://community.weweb.io/t/uploading-multiple-files-to-xano-solved/590 "2022-05-25T02:03:20Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kevinwasie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kevinwasie/32/402_2.png) [@kevinwasie](https://community.weweb.io/u/kevinwasie)\
**Post date:** [July 21, 2022, 1:27pm UTC](https://community.weweb.io/t/uploading-multiple-files-to-xano-solved/590/9 "2022-07-21T13:27:30Z")

</div>

@kyanaloe I love the noCode loop. I didnt think to do that.

If someone finds this and wants the JS version to only make one API call and send the files all at once, here’s what I use:

 ![Screen Shot 2022-07-21 at 9.25.42 AM](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/1X/e882f3af3075f2b7b0365a8bcfd68408670c8ecc.png)

```auto
try {
var formData = new FormData();
var formFiles = document.querySelector('#offer_documents input').files;
var response;
    for (let i=0; i < formFiles.length; i++) {
    formData.append('files[]', formFiles[i]);
    }

return await axios.post('https://xano.io/api :... ccu/offer/upload_documents', formData, {
    headers: {
      'Content-Type': 'multipart/form-data'
       }
    })}
    
catch (e) {
   throw new Error("There was a problem with the uploads: " + e)
}

```

---

_[View the full topic](https://community.weweb.io/t/uploading-multiple-files-to-xano-solved/590)._
