Hi,

I have a form with a upload component inside. And I have set the size limit
of uploaded file by codes like:

configuration.add(UploadSymbols.REQUESTSIZE_MAX, "2097153");
configuration.add(UploadSymbols.FILESIZE_MAX, "2097153");

then I upload a file that exceeds the limit, and catch exceptions like :

Caused by:
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (3507770) exceeds the configured
maximum (2097153)
        at
org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:937)
        at
org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:331)
        at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:351)
        at
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
        ...

after that, no matter what file I upload, I will catch the same exception,
even if the uploaded file doesn't exceed the size limit.

Please can somebody help and tell how to solve the problem above? Thanks.

-- 
Zhanpeng Fang 方展鹏
Department of Computer Science & Technology,Tsinghua University

Reply via email to