Search Results for

Show / Hide Table of Contents

# Class FileValidatingEvent

Event payload used before a file is accepted by the server. Handlers can reject the upload by setting Cancel and CancelReason.

##### Inheritance

object
FileValidatingEvent

##### Inherited Members

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

###### Namespace: CoreUpload.Events

###### Assembly: CoreUpload.dll

##### Syntax

    public class FileValidatingEvent

### Properties

#### Cancel

Gets or sets a value indicating whether the upload should be rejected.

##### Declaration

    public bool Cancel { get; set; }

##### Property Value

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

#### CancelReason

Gets or sets the reason returned to the caller when the upload is rejected.

##### Declaration

    public string? CancelReason { get; set; }

##### Property Value

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

#### ContentType

Gets or sets the reported content type when available.

##### Declaration

    public string? ContentType { get; set; }

##### Property Value

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

#### FileName

Gets or sets the original file name.

##### Declaration

    public string FileName { get; set; }

##### Property Value

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

#### FileSize

Gets or sets the file size in bytes.

##### Declaration

    public long FileSize { get; set; }

##### Property Value

Type | Description
--- | ---
long |