My application is made using react-redux-starter-kit, and therefore, I have endpoints in another server that are accessed from the front-end by Redux's actions.
I need to upload images, but the server in this react-redux-starter-kit is now express, and I can't find a way for it to work. Below's my API Proxy code:
My application is made using
react-redux-starter-kit
, and therefore, I have endpoints in another server that are accessed from the front-end by Redux's actions.I need to upload images, but the server in this
react-redux-starter-kit
is now express, and I can't find a way for it to work. Below's my API Proxy code:I'm passing the uploaded image to the API using
FormData
, like this:Action:
Like this, the data received in the API is
null
. Please, anyone, help me. Thank you.