title: Determine the size of a file upload before reading it all in in the Apache FileUpload Streaming API
body: <p>There are two ways to use the Apache FileUpload Library.</p>
  
  <p>FileUpload</p>
  
  <p><a href="http://commons.apache.org/fileupload/using.html" rel="nofollow">http://commons.apache.org/fileupload/using.html</a></p>
  
  <p>And Streaming FileUpload API</p>
  
  <p><a href="http://commons.apache.org/fileupload/streaming.html" rel="nofollow">http://commons.apache.org/fileupload/streaming.html</a></p>
  
  <p>They both work great except that the streaming API does not seem to have a way to check the fileSize before processing the stream.</p>
  
  <p>Is this because the Streaming API fundamentally does not know the file size or because I need to manually read some headers or something to get the Multipart upload size?</p>