aspose file tools
The moose likes Struts and the fly likes File upload with FormFile loses filename capitalisation. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "File upload with FormFile loses filename capitalisation." Watch "File upload with FormFile loses filename capitalisation." New topic
Author

File upload with FormFile loses filename capitalisation.

Ashley Roper
Greenhorn

Joined: Sep 26, 2011
Posts: 2
Hi,

I am finding that all file uploads in our site use struts FormFile, which works rather well, I have however noticed that the filenames are always in lowercase, no matter what they were before upload.

I cannot see anything in the documentation that explains this.
The problem exists across browsers.
Most users will be use Windows however issue also occurs on Linux.

Current thinking is to create another field on the Struts Form in which to store the filename, and to have JavaScript populate this value using onChange.

Any explanations or neater solutions would be much appreciated.
Ashley Roper
Greenhorn

Joined: Sep 26, 2011
Posts: 2
My rather crude work around :



Using the theFileName String value as the real filename, capitalisation preserved.
This issue was with Struts 1 by the way.

Any alternate solutions or an explanation for the issue would still be appreciated.


 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: File upload with FormFile loses filename capitalisation.
 
Similar Threads
Commons FileUpload
display Formfile from struts form in session scope
File upload in struts
File upload in struts
How to use FormFile?