Answers for "validating file upload asp.net core mvc"

C#
0

validating file upload asp.net core mvc

public class UserViewModel
{
        [Required(ErrorMessage = "Please select a file.")]
        [DataType(DataType.Upload)]
        [MaxFileSize(5* 1024 * 1024)]
        [AllowedExtensions(new string[] { ".jpg", ".png" })]
        public IFormFile Photo { get; set; }
 }
Posted by: Guest on March-10-2020

Code answers related to "validating file upload asp.net core mvc"

C# Answers by Framework

Browse Popular Code Answers by Language