Validate uploaded image file in MVC 5 HttpPostedFileBase
A client wants to implement an image upload for user profiles last week. The file is validated when users upload for the right format and size. In MVC, the uploaded file is of the class HttpPostedFileBase. My solution is create a few extension methods for the class HttpPostedFileBase. These methods validate whether file is of an image format, … [Read more…]