commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Lynggaard <>
Subject [FileUpload ] Multiple files and getting file sizes early ?
Date Thu, 01 Sep 2005 19:10:27 GMT

I have a situation where users select multiple files to upload. We have a 
maximum size limit on the individual files.

The problem is that I would like to give the users an early warning if they 
have selected a file that is too big. 

Lets say that that the user has selected 5 files oof 3 mb each and one file 
of 4 mb, and lets asume the filelimit is 3.5 mb per file.

So far only been able to get the sizes after the entire upload of the 19 mb 
is completed. :-(

Looking at the RFC for multipart upload it does appear that the headers are 
sent before the actual filecontent, so that makes me think I can get the 
file sizes before the actual content is ready.

Looking at FileUploadBase.parse() it very clearly waits until the entire 
content is loaded, so how do I work around it ?

Side question: When will the servlet methods like doPost etc be called ? 
only after the entire request is uploaded or earlier ?

Best Regards
Henrik Lynggaard

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