yaityaich
yaityaich

Reputation: 1

File upload with advanced mode not working

I'm trying to add advanced mode of FileUpload in Appfuse project and i followed this link: http://www.primefaces.org/showcase/ui/file/upload/multiple.xhtml.

I add it but when in choose my files, there is no files displayed in growl tag and the upload and cancel button steel disable.

In the terminal of my navigator i have this error : TypeError: undefined is not a function.

Can you help me plzz Thanks

Upvotes: 0

Views: 891

Answers (1)

Karim
Karim

Reputation: 1098

the showcase has a bug you you need to declare enctype with the value multipart/form-data Example

<h:form enctype="multipart/form-data">
    <p:growl id="messages" showDetail="true" />
 <p:fileUpload fileUploadListener="#{fileUploadView.handleFileUpload}" mode="advanced" dragDropSupport="false"
                  multiple="true" update="messages" sizeLimit="100000" fileLimit="3" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />

    <p:growl id="messages" showDetail="true" />
</h:form>

Upvotes: 0

Related Questions