❔ Why is my ASP.NET Core Web API not responding at all to a `multipart/form-data` request?
Specifically my client is Expo Go (React Native) on a physical Android, and the request does work in Postman.
On my server:
On my client, I'm creating a request like this:
But whenever I try to send this request, the server does not respond at all. However, if I remove the headers (default
Content-Type: application/json
) then it does respond with 400
, along with these logs:
3 Replies
well in my case i needed to add to the post method following attribute:
Still doesn't work. The weird thing is that it does work in Postman, but not in my Expo Go (React Native on physical Android) app
Now that I think about it, since it does work in Postman with a similar request (uploading a file from my PC instead of getting the file from a URI on the Android itself), it's probably a problem on the mobile app's end and not my server, so here's probably not where to ask it
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.