i want to select only image files only
views:
57answers:
2
+1
A:
This is done by the accept
attribute, but it is not supported by all browsers.
<input type=file name=photo size=20 accept="image/*">
Sjoerd
2010-07-07 09:14:40
Sorry Sjoerd it is not working in IE and Firefox
sree2010
2010-07-07 09:24:21
A:
This is difficult using the standard HTML upload control.
If you can require your users to have Flash, SWFUpload is a very fine alternative. It's even possible to filter the files the user sees in the "choose file" view by extension.
Here's a demo (change the file_types
field to test).
Pekka
2010-07-07 09:52:51