Class UploaderValidateOption
Holds legacy file validation settings such as size, extension, and MIME restrictions.
Inheritance
UploaderValidateOption
Assembly: AjaxUploader.dll
Syntax
[TypeConverter(typeof(ExpandableObjectConverter))]
public class UploaderValidateOption
Properties
AllowedFileExtensions
Gets or sets the allowed file extensions.
Declaration
public string AllowedFileExtensions { get; set; }
Property Value
AllowedFileMimeTypes
Gets or sets the allowed MIME types.
Declaration
public string AllowedFileMimeTypes { get; set; }
Property Value
AllowedFileRegExp
Gets or sets the regular expression used to validate file names.
Declaration
public string AllowedFileRegExp { get; set; }
Property Value
EnableMimetypeChecking
Gets or sets whether MIME type validation is enabled.
Declaration
public bool EnableMimetypeChecking { get; set; }
Property Value
MaxSizeKB
Gets or sets the maximum allowed file size in kilobytes.
Declaration
public int MaxSizeKB { get; set; }
Property Value
Methods
GetMaxSizeKBWithConfig()
Returns the effective maximum file size in kilobytes.
Declaration
public int GetMaxSizeKBWithConfig()
Returns
MatchExtension(string)
Tests whether the file name matches the configured extension allow-list.
Declaration
public bool MatchExtension(string filename)
Parameters
| Type |
Name |
Description |
| string |
filename |
|
Returns
MatchMimeType(string, string)
Tests whether the supplied MIME type matches the configured allow-list.
Declaration
public bool MatchMimeType(string filename, string filetype)
Parameters
Returns
MatchRegExp(string)
Tests whether the file name matches the configured regular expression.
Declaration
public bool MatchRegExp(string filename)
Parameters
| Type |
Name |
Description |
| string |
filename |
|
Returns
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
A string that represents the current object.
|
Overrides