Commons FileUpload
  1. Commons FileUpload
  2. FILEUPLOAD-163

Temporary file soon got deleted before I can reference

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      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.

        Activity

          People

          • Assignee:
            Jochen Wiedmann
            Reporter:
            Kevin Tian
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development