0

I have implemented fileupload using Primefaces 5.2 in my application. Currently some of my users are experiencing an issue when they try to upload many files at the same time; some of the files will not get uploaded (i.e. 2 out of 62 files not uploaded).

This is the code for the fileupload:

<p:fileUpload mode="advanced" multiple="true" update="uploadStatus" label="#{msg['config-selsam']}" allowTypes="/(\.|\/)(CEL)$/" fileUploadListener="#{gexAffyBean.inputFile.multipleFileUploadListener}">
</p:fileUpload>

This is the bean code:

public void multipleFileUploadListener(FileUploadEvent event) {
    System.out.println("Upload fileCount"); // Added for debug
    fileList.put(++fileCount, fileUploadListener(event));
}

In the case simulated, I can see that the multipleFileUploadListener method is being called 60 times even though 62 files are uploaded.

Has anyone encountered this issue before? This issue happened randomly, and from my observation, this issue tend to happen when the user has a slow internet connection.

Thanks in advance for any advice or insight that you can share.

weihong
  • 1
  • 1
  • Possible duplicate of [File-upload with multiple files fails in Primefaces 5.1](http://stackoverflow.com/questions/30500731/file-upload-with-multiple-files-fails-in-primefaces-5-1) – Vsevolod Golovanov Feb 05 '16 at 10:05
  • Thank you Vsevolod for the link. Based on the information from the link I have upgraded my Primefaces to version 5.3, and added the parameter sequential="true" in fileupload. The same issue has not happened for the past few days, until today we notice another case whereby one of the files was not uploaded (i.e. 1 out of 60 files). – weihong Feb 15 '16 at 07:00

0 Answers0