As simple as it can be, but it is not working
upload.xhtml
<p:fileUpload mode="advanced" skinSimple="true" auto="true" fileUploadListener="#{upload.fileUploadListener}" />
method
public void fileUploadListener(FileUploadEvent e){
// Get uploaded file from the FileUploadEvent
this.file = e.getFile();
// Print out the information of the file
System.out.println("Uploaded File Name Is :: "+file.getFileName()+" :: Uploaded File Size :: "+file.getSize());
}
My environment is
Sprintboot - 2.0.2 PrimeFaces 6.x Mojarra 2.3.4 PrimeFaces Extensions 6.2.4