file ext shown automatically while uploading

hi !is there anyway while uploadingfile i want to get some specific data types to be shown instead of all files in file type row.-jai
[154 byte] By [jainagarania] at [2007-11-27 2:07:55]
# 1
You can use the 'accept' attribute of input type="file". But the implementation still depends on the user agent used.Also see http://www.w3.org/TR/html4/interact/forms.html#adef-accept and http://www.cs.tut.fi/~jkorpela/forms/file.html#filter
BalusCa at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
hi i tried with that but it was not showing in the file type column.i have used accept=text/xml-jai
jainagarania at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Click and read the links. It depends on the user agent used.You can consider to add an extra clientside validation using Javascript.
BalusCa at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
hi, after clicking the browse button one popup will appear with file type right, in that i want specified file types to show to the user. not 4 validating.-jai
jainagarania at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Face it, you're limited to the implementation by the user-agent.

Despitely most user agents indeed ignores the official spec according to the 'accept' attribute of input type="file".

Microsoft for example states: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/accept.asp

There is no functionality implemented for this property unless defined by the author.

W3C states: http://www.w3.org/TR/html4/interact/forms.html#adef-accept

User agents may use this information to filter out non-conforming files when prompting a user to select files to be sent to the server

Note the "may", it is not "must", nor "should" nor "have to".

Go figure: http://www.google.com/search?q=input+type+file+accept+filter

BalusCa at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
thanks-jai
jainagarania at 2007-7-12 1:56:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...