I form data into a form for angular like this:
const formDate = new FormData();
formDate.append("restaurant", JSON.stringify(this.restaurant));
formDate.append("file", this.file[0], this.file[0].name);
I can see through the developer panel in the browser that the form is submitting the correct data:
But the controller accepts such data, and the file arrives normally:
Controller:
[HttpPost, DisableRequestSizeLimit]
public IActionResult Post([FromForm]Restaurant restaurant, [FromForm]IFormFile file)
{
code...
}