Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
bridge-impl-4.0.0, bridge-impl-4.1.1, bridge-impl-4.1.3
-
None
Description
According to the Stackoverflow post titled Java Servlet 3.0 File Upload - Removing TMP Files, temporary files matching the pattern upload_*.tmp are supposed to be cleaned up by the servlet container when Part.getInputStream() or Part.delete() is called.
Many of the JSF "Applicant" portlet demos are exhibiting a problem such that these upload_*.tmp files are not getting cleaned up. It is likely not a problem associated with Liferay Portal or Tomcat since the PortletMVC4Spring "Applicant" portlet demos do not exhibit the same problem.
In addition, according to the Stackoverflow post titled How to delete PrimeFaces UploadedFile temp file after processing, Apache Commons File Upload is supposed to be deleting uploaded files on an interval. However, when using Liferay Faces Bridge, these files aren't getting cleaned up either.
The solution is to fortify UploadedFileBridgeImpl.java with the ability to delete the upload_*.tmp files as well as the uploaded file written by PrimeFaces when the UploadedFile.delete() method is called.