You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sc...@takgroup.net on 2003/03/24 20:13:41 UTC

[FileUpload] checking item sizes before reading

I am trying to use the FileUpload object to determine one by one whether
or not a file should be uploaded based on its size.  I commented out the
code in parseRequest() that throws an exception if the request is too
big, and when I get the list back I can check the item size before I
write it to the disk, but the problem is the data is still read, so if
it is a large file it takes too long to process.  Is there a way to
determine the size of the current item before calling
multi.readBodyData(os); in parseRequest?  I tried checking the item
size, but it always returns 0 at this point.

Thanks