i am passing data from the client to the server (WebAPI or MVC) as a pure json as the http post body while using Content-Type:application/json.
it works great but now i need to add to the same post request a file which the user may need to add to that http post.
As per my understanding i can not use formData object because i can not mix the body with json and the formData.
i thought about using FileReader javascript function and pass the encoded string as one of the json properties but it smells as a "bad practice".
is there a better way to do so?