File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
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://aspose.com/file-tools
 
subject: File upload with FormFile loses filename capitalisation.
 
Similar Threads
File upload in struts
How to use FormFile?
Commons FileUpload
display Formfile from struts form in session scope
File upload in struts