commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject File Name at server side is always in lower case! Is it possible to get File Name as it is in client side?
Date Mon, 10 Jul 2006 07:19:27 GMT


I used commons FileUpload for file upload feature in servlet.

using API i get all the required information but

I am struggling a on small issue ...

Here's my requirement...

i want File name as it ...

Code ::

                        // Create a factory for disk-based file items
                        DiskFileItemFactory factory = new
                                    yourMaxMemorySize, yourTempDirectory);

                        // Create a new file upload handler
                        ServletFileUpload upload = new

                        // Parse the request
                        List /* FileItem */items =

                        // Process the uploaded items
                        Iterator iter = items.iterator();
                        while (iter.hasNext()) {
                              FileItem item = (FileItem);

                              if (!item.isFormField()) {
                                    clientFileName = item.getName();
                                    sizeInBytes = item.getSize();

i used above code to get required information about selected file.

but i always get file name in lower case format

For Example:

      Selected File Name:

      File Name after API Call:


Plz suggest me solution


This e-Mail may contain proprietary and confidential information and is sent for the intended
recipient(s) only.  If by an addressing or transmission error this mail has been misdirected
to you, you are requested to delete this mail immediately. You are also hereby notified that
any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution
and/or publication of this e-mail message, contents or its attachment other than by its intended
recipient/s is strictly prohibited.

Visit us at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message