I'm using webapi asp.net core, initially my actions were using the [FromBody] attribute on the parameters, and my front end send a json. Now I'm implementing a screen that has upload, and I had to use FormData to send the file, and at that point I inserted my object (which I used to send as json) in my FormData. So, I needed to change my backend to accept the FormData, just remove [FromBody].
I would like use my action, both by passing formdata or passing a json, is it possible? How can implement this?