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.
Try this (setting it to 3MB):
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory(3000 * 1024, tmpDir));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With