PDA

View Full Version : Uploaded file name changed to all lowercase


pjydc
Mar 23rd, 2006, 10:28 AM
I am using CommonsMultipartResolver and CommonsMultipartFile to upload files.

.....
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsM ultipartResolver"/>
....

....
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
CommonsMultipartFile file = (CommonsMultipartFile) multipartRequest.getFile("file");
...


However, the filenames of all uploaded files (obtained via file.getOriginalFilename()) are changed to lower case (for example: ABc.doc is changed to abc.doc). Is there any way to keep them as they were?

Thanks!

rcastro
Jul 26th, 2006, 07:40 AM
It is a bug in commons-fileupload 1.1. Upgrade to 1.1.1 (release date: 06/08/2006) that you should have no more problem regarding that.