diegohaz / arc

React starter kit based on Atomic Design
https://arc.js.org
2.91k stars 295 forks source link

How would you POST a file upload using api? #342

Closed Geczy closed 6 years ago

Geczy commented 6 years ago

Title

The way the current setup is it does not send multipart forms and only sends json data

I'm just doing a manual fetch and skipping redux as a result

usmantahirr commented 6 years ago

Going through the same issue. Trying to find a solution but can't

diegohaz commented 6 years ago

You need to update src/services/api to handle that use case: https://github.com/diegohaz/arc/blob/358491388d65fcd45948c62d5a2032cdd2efb671/src/services/api/index.js#L27

I'd be glad to accept a PR with a generic solution. :)