commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex <outroa...@gmail.com>
Subject Re: [fileupload] ServletFileUpload.setSizeMax only considered once request is complete
Date Sun, 18 Sep 2011 12:42:04 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message