Hi all,
I have a page that lets users upload files. I'm limiting users to uploading files that are smaller than 5MB. Currently, the server checks the HTTPServletRequest content length. However, this means that the whole file must 1st be uploaded before the servlet can respond with "file too large!" I want to be able to figure out the file size before the whole file is uploaded (i.e. the whole stream is read) and continue the upload if the file is small and report with an error if its too large.
are there any javascript methods or a way to use a servlet filter to get this done?
any ideas?
Thanks and happy holidays!
I have a page that lets users upload files. I'm limiting users to uploading files that are smaller than 5MB. Currently, the server checks the HTTPServletRequest content length. However, this means that the whole file must 1st be uploaded before the servlet can respond with "file too large!" I want to be able to figure out the file size before the whole file is uploaded (i.e. the whole stream is read) and continue the upload if the file is small and report with an error if its too large.
are there any javascript methods or a way to use a servlet filter to get this done?
any ideas?
Thanks and happy holidays!