How to get the real file size of a file in a multipart/form-data request
问题 As the title says, I need to get the real filesize of a file posted as a multipart/form-data request. I'm based in the JSF world but I think the problem is technology-agnostic (only depends on HTTP). The value specified in the Content-Length header is not sufficient because it includes the boundaries and other form parameters. Example request (body only): -----------------------------355432893771247592819421210 Content-Disposition: form-data; name="composeform" composeform -------------------