title: How to know the file size when uploading via multipart form-data?
body: <p>I am exercising a simple application with HTML client that uploads a file to the server and must display a progress bar :)</p>
  
  <p>The server is servlet-based, some servlet receives the multipart content, parses it etc. Obviously, at every moment I know the number of bytes received so far. However in order to supply an info for the progress bar on the client side a servlet also needs the total number of bytes for the file, which is being uploaded. Any idea where to get the total number of bytes from please?</p>
  
  <p>Thanks!</p>