Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3468

Temporary files are not deleted after file upload

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                bridge-impl-5.0.0
                bridge-impl-6.0.0
                bridge-impl-4.1.4