4,824 questions
If you mouse over the error it'll tell you what is wrong. There is no Files
property on Request in ASP.NET Core. Files are accessible from Request.Form.Files. Note that it could be empty so you need to handle the fact that there may be none.
var files = Request.Form?.Files;
if (files?.Any() ?? false)
{
...
}