Reputation: 783
Situation : I'm uploading a file with a few thousand records. Upto file sizes of 100 kB, there's no problem. However, I get an exception at file sizes of over 100 kB.
Problem: I get an exception at the following line:
List<DiskFileItem> items = upload.parseRequest(request);
The exception I get is:
Error while processing multipart request:org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\DNDUtility\upload_tmp\upload_172408d6_14c27eae211__8000_00000001.tmp (The system cannot find the path specified) : Processing of multipart/form-data request failed. D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\DNDUtility\upload_tmp\upload_172408d6_14c27eae211__8000_00000001.tmp (The system cannot find the path specified)
I've even set the ServletUpload.MaxFileSize() to 1 MB. Yet, I get an exception if I try to upload files over 100 kB.
Upvotes: 3
Views: 951
Reputation: 3275
Try this (setting it to 3MB):
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory(3000 * 1024, tmpDir));
Upvotes: 2