Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-163

Temporary file soon got deleted before I can reference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • Windows Vista Home, Apache Tomcat 6.0

    Description

      Here is the partial of codes I apply for Apache File upload

      diskFileItemFactory = new DiskFileItemFactory();
      diskFileItemFactory.setRepository(new File(tmpDirectory));
      diskFileItemFactory.setFileCleaningTracker(null);
      fileUpload = new ServletFileUpload(diskFileItemFactory);
      items = fileUpload.parseRequest(httpServletRequest);

      This problem happens often but not always, sometimes it can be successfully run.

      The problem is when I attempt to reference the file object, the real data file stored in my temporary directory soon got deleted before I can reference. After some research on my own, I discovered that there could be a file cleaning tracker there to clean up the temporary file, but after disabling it it still didn't solve the bug.

      Attachments

        Activity

          People

            jochen@apache.org Jochen Wiedmann
            ktian Kevin Tian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: