FileUpload - Single

Single mode allows only file to be selected from the native file dialog.

Choose

Source

<h:form>

    <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" mode="advanced" dragDropSupport="false"
                  update="messages" sizeLimit="100000" fileLimit="3" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />

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

</h:form>