POST actions in [ApiController] in ASP.NET Core 2.1
问题 I have the following ASP.NET Core 2.1 Api controller: [Route("api/[controller]")] [ApiController] public class ImagesController : ControllerBase { [HttpPost("[action]")] public async Task<IActionResult> Upload([FromForm]ICollection<IFormFile> files) { ... } [HttpGet("thumbnails")] public async Task<IActionResult> GetThumbNails() { ... } Both the GET and POST actions worked with Postman. However, the POST action would not work with the UI: the action would always receive a files parameter