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.