[Route("api/file")]
[Produces("application/json")]
[Consumes("application/json", "application/json-patch+json", "multipart/form-data")]
[ApiController]
public class FileController : ControllerBase
{
public FileController()
{
}
[HttpPost]
public async Task<IActionResult> PostProfilePicture([FromQuery]IFormFile file)
{
var stream = file.OpenReadStream();
var name = file.FileName;
return null;
}
}
Postman
Debug
In the end file = null How to solve this problem?

