Hai : My self upendra maheshwari,i have an problem in cheking the file size while uploading through jsp ,i am using multipart request method for tht .can we check the file size with the help of java script ...so we can restrict to upload more than 5 mb size file...tell me . Upendra Noida
The only way to do this would be for whatever server process (e.g. servlet) is 'receiving' the file, to count the amount of data transferred, and terminate the connection when this amount exceeds 5Mb.
There are alternatives, for example having using some form of trusted client side code (signed applet or scripting of an activex object), however, the first option is likely to be far easier, unless you have a limited user base.