Issue Details (XML | Word | Printable)

Key: FILEUPLOAD-30
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Daniel Wood
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons FileUpload

[fileupload] filename drops case

Created: 03/Feb/06 02:21 AM   Updated: 09/Mar/07 08:31 PM
Return to search
Component/s: None
Affects Version/s: 1.1 Final
Fix Version/s: 1.2

Time Tracking:
Not Specified

Environment:
Operating System: Windows XP
Platform: PC

Bugzilla Id: 38490


 Description  « Hide
When I'm iterating over a set of FileItems, the getName method returns the
source filename in all lowercase.

I did a little inner-class extension of the ServletFileUpload class as follows :

FileUpload fu = new ServletFileUpload(factory) {
protected java.lang.String getFileName(java.util.Map headers)

{ String fn = super.getFileName(headers); log(fn + " :: " + headers.toString()); return fn; }

};

in my tomcat (5.5) log, I get entries like this :

c:\program files\samples\scrolling.fla] :: {content-length=36864, content-disposition=form-data; name="userfile[21]"; filename="C:\Program Files\Samples\Scrolling.fla", content-type=application/octet-stream}

so it appears as if the filename in the headers is correctly case sensitive, but
the getFileName method is returning the filename in all lowercase... ?

thanks in advance, and if there is anything else I can provide, please let me know.

-daniel



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Niall Pemberton added a comment - 03/Feb/06 02:26 AM
I believe this was fixed recently:

http://svn.apache.org/viewcvs.cgi?rev=367087&view=rev


Martin Cooper added a comment - 03/Feb/06 02:27 AM
This was fixed on Jan 8. The fix is available in the nightly builds.

Daniel Wood added a comment - 03/Feb/06 02:43 AM
Sorry for the repeat report...

This was my first time using the commons library and posting a bug. I should've
poked around a bit harded outside of bugzilla before posting. In any event,
THANKS for the FAAAAST reply (5 minutes!), and I'm up-n-running.

-daniel