You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alex <ou...@gmail.com> on 2011/09/18 14:42:04 UTC

Re: [fileupload] ServletFileUpload.setSizeMax only considered once request is complete

Hello,

When I do this:

FileItemFactory factory = new DiskFileItemFactory();
> ServletFileUpload upload = new ServletFileUpload(factory);
> upload.setSizeMax(100 * 1024 * 1024); // 100 MB


FileUpload will accept the entire request before finally throwing the
exception if the sum of the sizes of all files exceeds the set limit.

Is there any way for it to preemptively stop the request?

Thanks

- Alexandre