I want to upload an Image file with Model data so I am using FromForm with IFormFile in Asp.net core api.
[HttpPost]
public IActionResult AddData([FromForm] AddDataModel addDataModel, IFormFile formFile)
{
// Logic here...
}
I am using Angular 7 in the frontend side. I am adding model data and file to FormData and trying to send it but It always all model fields values null.
What is the right way to solve this?