Type Default Value Read Only Description
Long 8,388,608 No The maximum number of bytes which will be accepted in an upload.

 

   
Notes
 
     

This property is used to limit the size of uploads. The limit here refers to the total size of the HTTP upload in bytes (approximately equal to the sum of all the files being upload). Because the entire content of the HTTP upload must be stored either on disk or in memory you may wish to limit the MaxUploadSize.

At the point that field values are returned the upload has already taken place. So if you wish to change the value of the MaxUploadSize you should do so before any form fields are referenced.

The server will check the size of data it needs to process and if it is too large will refuse to accept it. Because the server is refusing the request the uploading browser will report that the submission page is not available. This means you cannot provide an error message to the user via that page.

If you believe that visitors may attempt to perform uploads greater than the MaxUploadSize you should report error messages back via a progress window. The Progress.Note field will hold a message describing why the transfer was aborted.

Suppose you have three pages - your form page (form.asp) which submits uploaded files to another page (upload.asp) and reports progress via progress.asp. If a user attempts to make an oversize upload from form.asp then upload.asp will reject the transfer. The client browser will report that upload.asp is unavailable. However the reason why the request was refused will be available via the XProgress object in progress.asp and so an error message can be reported to the user.

Other upload components use different understandings of maximum upload size. Some take it to mean the maximum size of files that can be saved out of the upload. By the time that you know the files are too big you have already uploaded them so it seems irrelevant to fail a transfer at this point. If you want to limit the size of saved files then check the XField.Length property before saving. Other upload components terminate an upload when they reach the maximum set upload size. This means the user has to wait for the upload to complete before being informed of a problem and the server is left with a partially complete upload.

 

   
See Also
 
     

None.