FileUpload.size (Property)

Returns the size of the file to be uploaded.


JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Property/method value type:String primitive
JavaScript syntax:-myFileUpload.size

It may be important to limit the size of files being uploaded to the server.

It is very possible that vindictive users may use file uploading to try and crash your server or deny its availability to other users by uploading massive files to it.

On the other hand, there may be limits you want to impose as a courtesy to the network managers who run the LANs and WANs where your users will be browsing. Allowing the user to upload unnecessarily large files will saturate their network as well as your server.

By testing this property, you can impose limits of acceptability on file uploads.

See also:Input.size