On 7/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, 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 DiskFileItemFactory( yourMaxMemorySize, yourTempDirectory); // Create a new file upload handler ServletFileUpload upload = new ServletFileUpload(factory); // Parse the request List /* FileItem */items = upload.parseRequest(request); // Process the uploaded items Iterator iter = items.iterator(); while (iter.hasNext()) { FileItem item = (FileItem) iter.next(); 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: c:\upload\SampleFile001.txt File Name after API Call: c:\upload\samplefile001.txt Expecting: c:\upload\SampleFile001.txt Plz suggest me solution
Use the latest release - this was an issue in FileUpload 1.1 that was fixed in FileUpload 1.1.1, which was released in June. -- Martin Cooper Thanks!
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 http://www.polaris.co.in --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]