commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Podolski <robpodol...@yahoo.co.uk>
Subject [fileupload] File Size Limit Exceeded - Any method for early detection?
Date Mon, 04 Oct 2010 17:58:30 GMT
Hi,

Thanks for putting together Commons FileUpload - can see many advantages in 
using it.  Whilst looking at the APIs I realised that the detection of files 
that are larger than the user-defined size limit set as...

ServletFileUpload upload = new ServletFileUpload(factory);
upload.setFileSizeMax(10000000L);

will only operate AFTER the file has been received in the servlet request.

Certainly for my purposes, this would be too late. I would not want my user to 
wait for ages while her browser tries to post, say,  a 2 GB file - when the file 
size limit is 10Mb.  Given that javascript cannot obtain access to local files 
(and hence detect the problem early), this is a thorny problem.

Have I miscounstrued things? Any suggestions? Would the streaming API help?

regards,

Rob



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