PDA

View Full Version : Validate file extension



chuvinha
15 Mar 2011, 9:31 AM
Hi guys, I am not able to validate file extension.
I have two fields: comboBox and fileUpload.
The user choices the type of file from comboBox and next He choices the file.
So I need to validate this file.
If the user chose image, so I have to validate the file for .jpg extension.
If the user chose pdf, so I have to validate the file for .pdf extension.
Could someone help me?