Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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; }
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity c# audio source 
Csharp :: c# append array 
Csharp :: roman to 
Csharp :: array join c# 
Csharp :: how to duplicate a clip in premiere pro 
Csharp :: how to set a transform equal to something unity 
Csharp :: c# parse string to xml 
Csharp :: linq get a dictionary key and value c# 
Csharp :: scene switch unity 
Csharp :: c# execute shell command 
Csharp :: c# datagridview header color 
Csharp :: Customize yup number 
Csharp :: c# create console for winform 
Csharp :: NameValueCollection 
Csharp :: ffmpeg add audio to video at specific time 
Csharp :: split string c# 
Csharp :: get tag unity 
Csharp :: .net core partial view with model 
Csharp :: c# use api rest 
Csharp :: C# async to sync 
Csharp :: c# quit button script 
Csharp :: append multi lines to file linux 
Csharp :: c# binary search 
Csharp :: comments in c# 
Csharp :: c# loops 
Csharp :: first person mouse look unity 
Csharp :: decrease image size C# 
Csharp :: unity vector3 to array 
Csharp :: sorting list by date time dec in c# 
Csharp :: to list c# 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =