Notice: Source Code is moved to GitHub due to Technet Wiki Gallery component retiring.

 

 

Restricting or limiting upload file type extensions is one of the key business requirement as depending on business requirement, it is not necessary that all file types are accepted by the web application. Sometimes only image files are accepted by the web application, sometimes only documents and sometimes the combination of image, documents and compress file types are accepted by the web system.


Today, I shall be demonstrating limiting/restricting of desire upload file type extensions via implementing custom data annotation/attribute component on ASP.NET MVC5 platform. This article is not specific to image file only, you can use continue reading...