I programmed a FileUpload which is already working fine. Now I'd like to add a feature: At the form where I browse for the file I want to upload, I'd like to validate the file type.
I'd like to allow only image files in the formats .jpg, .gif and .png and show an error message if the file is not valid (= if the format is not allowed)
Does anybody know how i can program this feature?
KingDario
Member
97 Points
61 Posts
Fileupload: allow only .jpg .gif and .png
Dec 06, 2006 01:10 PM|LINK
Hi all
I programmed a FileUpload which is already working fine. Now I'd like to add a feature: At the form where I browse for the file I want to upload, I'd like to validate the file type.
I'd like to allow only image files in the formats .jpg, .gif and .png and show an error message if the file is not valid (= if the format is not allowed)
Does anybody know how i can program this feature?