views:

124

answers:

0

Hello. I'm trying to use Uploadify for uploading multiple files,

$('#fileuploadinput').uploadify({
    uploader: '/js/uploadify/uploadify.swf',
    script: '/uploadpath',
    cancelImg: '/js/uploadify/cancel.png',
    multi: true,
    fileDataName: 'uploadFile'
});

and there is a Spring controller with comons-fileupload 1.2.1 on the server side.

for (org.apache.commons.fileupload.FileItem item : items) {
    String name = item.getName();
    // some other stuff
}

I need to get the original name of the uploaded file, and it's fine when using standard input tag - the name is where it should be and item.getName() just returns it as expected. However, when using Uploadify item.getName() returns null. Is there a way to get the name?