if(multipartRequest != null) {
FileItem file = multipartRequest.getFileItem(fileUpload.getInputFileId(facesContext));
if(file != null) {
UploadedFile uploadedFile = new DefaultUploadedFile(file);
fileUpload.queueEvent(new FileUploadEvent(fileUpload, uploadedFile));
}
}
}