I added this line to my WebApiConfig
config.Formatters.XmlFormatter.SupportedMediaTypes.Add(new System.Net.Http.Headers.MediaTypeHeaderValue("multipart/form-data"));
(From my research I found that this is the only way to receive data and file at the same time, PS: Can I send JSON data and file data at the same time some way?)
because I couldn't receive multipart/form-data. Now I can receive the binary files only (from HttpPostedFile httpPostedFile = HttpContext.Current.Request.Files[0];
)... However I can't receive the actual data from my bind model in my action
public IHttpActionResult FooAction([FromBody]FooBindModel fooBindModel)
(the bind model is null). It seems that it doesn't bind the data or something? (the data are primitive strings and integers so I don't think that the type is the problem). PS: I am using to send my data Postman form-data.