public IFormFile UploadedImage { get; set; }
<div class="form-group row">
<label asp-for="UploadedImage" class="ml-2">Image</label>
<input asp-for="UploadedImage" class="form-control" type="file"/>
<span asp-validation-for="UploadedImage" class="text-danger"></span>
</div>
Currently user can upload anything, which will lead to awful things in backend.
Is there any easy straightforward way to allow uploading only images? Looking online some solutions look absolutely terrifying, but they are 5+ years old, so maybe .NET got better way to do it.
Like [Image]
attribute or something.