Code: Select all
<p:fileUpload id="upload" listener="#{reportUploadHandler.handleFileUpload}" label="Choose"
mode="advanced" auto="true" widgetVar="upldWV" update="upldPnl, messageList"
sizeLimit="5242880" allowTypes="/(\.|\/)(xlsx|pdf)$/i" virusScan="true"
validateContentType="true"
accept="application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" invalidFileMessage="This file type is not accepted" />