• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 776
  • Last Modified:

FileUpload - item.getName() return value

Hi,

I have this problem when gathering information for a file to be uploaded using FileUpload.

let's say the filename is: Abc.rtf

when I upload it using the commons FileUpload, the file was renamed to abc.rtf
I also noticed that in my code upon getting the filename by using item.getName(), it returns a the fullpath of the file which is all in lowercase.

Question is, How can I get the filename without the uppercase letters being converted to lowercase letters?
0
icemico
Asked:
icemico
1 Solution
 
objectsCommented:
not sure you can. may be case insensitive
0
 
colr__Commented:
Use Javascript.

Whent the use clicks the 'browse' button on their browser to select the file upload, have javascript set a dynamic hidden field whose value os the file name. Then capture this hidden field at your server end to correctly determine the original file name.

colr__
0
 
icemicoAuthor Commented:
thanks a lot!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now