I want to create the upload to my page:
But I can´t find the uploaded file at my Hard disk.
What should I change that I find the uploaded file?
It uploaded the file, but I can´t find it!
Here my web.xml
Code: Select all
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>
org.primefaces.webapp.filter.FileUploadFilter
</filter-class>
<init-param>
<param-name>thresholdSize</param-name>
<param-value>51200</param-value>
</init-param>
<init-param>
<param-name>uploadDirectory</param-name>
<param-value>/resources/images</param-value>
</init-param>
</filter>
Code: Select all
public void handleFileUpload(FileUploadEvent event) {
logger.info("Uploaded: {}", event.getFile().getFileName());
FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");
FacesContext.getCurrentInstance().addMessage(null, msg);
}