I need to upload file which is an image.I am using .But it will accept all types of files.I need only files with extensions such as .jpg,.jif etc.How can I make the upload dialogue to select only image files . Thanks in advance
+3
A:
You can't achieve this using standard input control. Common techniques include validating this on the server side or use some Flash upload control which allows more customizations. Also bare in mind that verifying the file extension is a necessary but not a sufficient condition that a file is image. There's nothing preventing the user from renaming an executable to .jpg
for example.
Darin Dimitrov
2010-09-30 07:17:12
Is there any way to check the uplaoded file is an image using some client side scripts?
Vishnu K B
2010-09-30 07:28:54
Darin Dimitrov
2010-09-30 07:30:45
Thanks for your advice.Let me know if there is any way to display the image of the file using <img > after selecting the file?
Vishnu K B
2010-09-30 07:36:11