The accept parameter is more a hint to the browser which files to show to the user, rather than a way to prevent the upload of other file types. Also, it's just a hint, so browsers are free to act on it as they see fit (and different browsers do indeed handle it differently). You need to validate on the server anyway in order to ensure that users didn't fiddle with the extension.
In Swing, one can absolutely control the allowed file types. I was hoping for something similar.
I do validate. However it is after the user has chosen the file. Unfortunately that means more mouse clicks which is bad usability and something which I was hoping to avoid.
Looks like I will have to live with it, since I have no control. Sigh.
Used to be that the File upload Input box was seriously limited. It used to be very frustrating to deal with it.
For those who did not really understand the usability perspective, this is a JFileChooser set to accept only csv files.
Notice the only option available is csv. Of course the user can still navigate the directory hierarchy.