MaxFileSize (Dundas Upload Control 2.0)

Dundas

MaxFileSize (Dundas Upload Control 2.0)

Overview | Properties | Methods

The maximum allowable file size in bytes.

Syntax

UploadObject.MaxFileSize = [long]

The MaxFileSize property syntax has the following parts:

Part

Description

long

The maximum allowable file size in bytes. Defaults to negative one (no limit).

Remarks

Set this property before calling Save or SaveToMemory in order to limit the size of files uploaded by a user. If you call either the control's or the NextFile object's Save or SaveToMemory methods and this limit is exceeded then an exception will be raised.

Note that if a file is encountered which exceeds this limit then no further form data will be processed. However, you can still access any form data processed previously through the control's Form collection.

Set this property to negative one (-1) for no limit.

Make sure that you use an On Error Resume Next statement so that any raised exceptions are handled in your ASP page. To retrieve a relevant error string use VBScript's Err.Description property.

See Also: MaxFileCount | MaxUploadSize