Uploaded files filter

liunx

Guest
Is there a way to filter the permitted files for upload in Web Application ? e.g: I want to allow uploading of Jpg and Giff files only. How do I do it ?
I know it's possible in Windows Apps, but can I do it in Web Apps as well ?

Thanks,
ALONUse system.io.path.getextension("filepath") to get the extension and use an if clause to let them through. It will return something like ".gif", ".jpg", etc.
 
Back
Top