415 Unsupported Media Type asp.net core
问题 Detail I am trying to post a file from Postman to the endpoint I have created. but it gives me this error. I am not passing the header Content-Type in postman 415 Unsupported Media Type API [Consumes("multipart/form-data")] [HttpPost] public async Task<IActionResult> SendEmail([FromBody]Entity entity) { try { return OK(); } catch (Exception e) { throw e; } } Class public class Entity { public List<IFormFile> Files { get; set; } } 回答1: Try using [FromForm] instead of [FromBody] for the method