File Upload in asp.net
- by vaibhav
I am using FileUpload control to facilitate Image file upload on my website.
I want to restrict a user to upload only Image file.
I am using
if (fupFirmLogo.PostedFile.ContentType == "image/Jpeg")
{
}
to check if the file is a image or not. I want to allow all image extensions like PNG, GiF, Jpeg, tif , BMP etc. How should I do it.