FileLimit with Multiple File FileUpload

UI Components for JSF
Post Reply
gdawgrancid
Posts: 2
Joined: 29 Dec 2015, 19:30

05 Jan 2017, 22:38

So I'm having a little issue with the fileupload component when allowing multiple files to be uploaded at once with a 500 file limit. When I try to upload batches of files in a row, it looks like the component is keeping the file count from the previous upload still, so I get a message saying that the maximum number of files has been exceeded. If I refresh the page, it will work again, but I'd have to refresh it before every following batch of files I'm uploading.
Here is my XHTML:

Code: Select all

   
<h:form id="form">
            <p:fileUpload id="uploader" fileLimit="500"
                    widgetVar="uploaderVar" multiple="true"
                    styleClass="multipleFileUpload" label="#{msg['Select Images']}"
                    mode="advanced"
                    fileUploadListener="#{viewController.bulkImageUploadListener}"
                    dragDropSupport="true" sequential="true"
                    sizeLimit="#{viewController.maxImageSize}"
                    allowTypes="/(\.|\/)(gif|jpe?g|png)$/">
            </p:fileUpload>

        </h:form>
I've tried it out with fewer attributes (removing sequential, dragDropSupport, and mode) and still run into the same issue. Is this just a bug with the fileLimit on multiple file uploads or is there something I need to do to reset the fileUpload component when it is finished. I have a remoteCommand that is triggered in the oncomplete in my actual use of this component and have tried having that update the fileUpload component and panel as well as trying out the resetInput tag within the remoteCommand to see if that helps out.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests