This is true with a proviso. While the stream has to be sent before it can be assessed generally, which is not great, you can do a lot on the server side to manage resources efficiently.
You can monitor the upload taking place, and, if you don't like the size, reject it whenever you like. You can also work from memory before writing to xml, database, file, zip, etc. The upload application I have exhibited in part in the struts wiki shows this. There is a lot in the commons fileupload package (thanks to Martin, I think) which can assist in this regard. Jack On Mon, 7 Mar 2005 13:47:45 -0500, Slattery, Tim - BLS <[EMAIL PROTECTED]> wrote: > > <2cents> > > I would highly appreciate if an "upload" could determine the > > size of the file before actually uploading it and reject the > > file if it's larger then the given limit, to reduce traffic. > > HTML/HTTP doesn't support that, IMHO. The <input type="file"...> tag just > grabs the file and starts sending it. The server has no clue how large the > file is until the entire thing arrives. (Remember the file and everything > else in the form is transmitted as a single MIME-format stream.) And > client-side script has no access to the client's file system, so you can't > get the size of the file that way. > > -- > Tim Slattery > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]