IFormFile always null (ASP.NET Core with MVC/Razor)
问题 I have an ASP.NET Core MVC app attempting to upload an IFormFile. However, the IFormFile is always null. None of the other solutions I've found have solved this issue. What am I doing wrong? Model public class EmailForm { [Display(Name = "Add a picture")] [DataType(DataType.Upload)] [FileExtensions(Extensions = "jpg,png,gif,jpeg,bmp,svg")] public IFormFile SubmitterPicture { get; set; } } Controller public async Task<ActionResult> Contribute([Bind("SubmitterPicture")] EmailForm model) { if