ComponentOne ToolBar for ASP.NET AJAX: Validating Files > Built-in Validation

Built-in Validation

Before any files are moved into the specified TargetFolder or TargetPhysicalFolder, C1Upload validates the files to see if the following conditions are met:

      Does the file size meet the specified requirement?

      Does the file type meet the specified requirement?

      Does the mime-type meet the specified requirement?

File Size

To enable a limit on the file size to upload set the MaximumFileSize property to an integer value. The default value is zero which prevents C1Upload from checking the file size.

File Type

To enable specific file extensions to upload set the ValidFileExtensions property to a period followed by the abbreviated extension name. To set multiple file extensions use a comma to separate the values assigned to this property. To see how to validate file extensions programmatically see, Validating File Extensions for Uploaded Files.

Mime-Type

To enable specific file extensions to upload set the ValidMimeTypes property to a period followed by the abbreviated extension name. To set multiple file extensions use a comma to separate the values assigned to this property.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.