Search Results for

Show / Hide Table of Contents

# Class UploaderValidateOption

Holds legacy file validation settings such as size, extension, and MIME restrictions.

##### Inheritance

object
UploaderValidateOption

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: CuteWebUI

###### 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

Type | Description
--- | ---
string |

#### AllowedFileMimeTypes

Gets or sets the allowed MIME types.

##### Declaration

    public string AllowedFileMimeTypes { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### AllowedFileRegExp

Gets or sets the regular expression used to validate file names.

##### Declaration

    public string AllowedFileRegExp { get; set; }

##### Property Value

Type | Description
--- | ---
string |

#### EnableMimetypeChecking

Gets or sets whether MIME type validation is enabled.

##### Declaration

    public bool EnableMimetypeChecking { get; set; }

##### Property Value

Type | Description
--- | ---
bool |

#### MaxSizeKB

Gets or sets the maximum allowed file size in kilobytes.

##### Declaration

    public int MaxSizeKB { get; set; }

##### Property Value

Type | Description
--- | ---
int |

### Methods

#### GetMaxSizeKBWithConfig()

Returns the effective maximum file size in kilobytes.

##### Declaration

    public int GetMaxSizeKBWithConfig()

##### Returns

Type | Description
--- | ---
int |

#### 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

Type | Description
--- | ---
bool |

#### MatchMimeType(string, string)

Tests whether the supplied MIME type matches the configured allow-list.

##### Declaration

    public bool MatchMimeType(string filename, string filetype)

##### Parameters

Type | Name | Description
--- | --- | ---
string | filename |
string | filetype |

##### Returns

Type | Description
--- | ---
bool |

#### 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

Type | Description
--- | ---
bool |

#### 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

object.ToString()