# \[Solved\] Sending a request using Axios in React via FormData object

**URL:** https://community.transloadit.com/t/solved-sending-a-request-using-axios-in-react-via-formdata-object/14867
**Category:** Uppy
**Created:** [April 4, 2019, 4:52pm UTC](https://community.transloadit.com/t/solved-sending-a-request-using-axios-in-react-via-formdata-object/14867 "2019-04-04T16:52:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![M1ke](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/m1ke/32/106_2.png) [@M1ke](https://community.transloadit.com/u/M1ke)
#### Post date: [April 4, 2019, 4:52pm UTC](https://community.transloadit.com/t/solved-sending-a-request-using-axios-in-react-via-formdata-object/14867/1 "2019-04-04T16:52:09Z")

</div>

Hi, thanks for the plugin.

I have integrated the React version of Uppy and am able to add a file, see a thumbnail and get an array containing my file object. The array has items including an ID, name, type etc.

I am using the FormData class to add the upload with data.append(‘file’, {uri: ‘file://’ + file.id, name: file.name, type: file.type});

However submitting this ends up with just [object Object] in the request body.

I am aware this issue could be with the Axios client, but I am unsure if I am getting data from the upload correctly. Is there a way to get the raw blob or base64 data from a file object in a files list?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![M1ke](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/m1ke/32/106_2.png) [@M1ke](https://community.transloadit.com/u/M1ke)
#### Post date: [April 5, 2019, 10:41am UTC](https://community.transloadit.com/t/solved-sending-a-request-using-axios-in-react-via-formdata-object/14867/2 "2019-04-05T10:41:30Z")

</div>

I have solved this but will leave this here for someone else. To use a “new FormData()” object to send a file you need to do: “data.append(‘file-input-name’, file.data, file.name)”

This should then translate into a proper request; remember to also set Content-type in your request headers to “multipart/form-data”
