File Upload in asp.net
Posted
by vaibhav
on Stack Overflow
See other posts from Stack Overflow
or by vaibhav
Published on 2010-05-28T12:10:16Z
Indexed on
2010/05/28
12:11 UTC
Read the original article
Hit count: 349
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.
© Stack Overflow or respective owner