I have a button to control the download, as shown below, in the action of the download button. did not use the download button inside the file upload control.
function clickUpload() {
var b = $(PrimeFaces.escapeClientId("form1:excelUpload")+" .ui-fileupload-preview").length;
if(b==0)
edis.showErrorMsg("Please select an Text File to upload");
else {
$(PrimeFaces.escapeClientId("form1:excelUpload")+" .ui-fileupload-upload")[0].click();
}
}
source
share