I have a
Struts 1 application, where the user is able to upload a file of his choice through a Struts File control. The basic functionality works fine. I would like to enhance the feature in these two ways:
1. When the user clicks on the Browse button to upload a file, it would default to a specific folder location (For eg: c:\temp). I tried using the value attribute to set folder path, but it is ignored.
2. I also want it to list only files of a certain type (for eg: *.jpg). I check for file type after it is chosen and display an error message if it is not what is expected, but ideally would like to preempt it. When
testing on IE 7, I am able to type in *.txt, and restrict file types that way... but on IE 8, the field is not editable.
Any suggestions? This is a secure intranet application with a login procedure etc., so there aren't any security concerns or violations. Thanks much for any and all suggestions!