Search Results for

Show / Hide Table of Contents

# Interface IUploadEventHandler

Defines optional callbacks that run during server-side validation and after successful uploads.

###### Namespace: CoreUpload.Events

###### Assembly: CoreUpload.dll

##### Syntax

    public interface IUploadEventHandler

### Methods

#### OnFileUploadedAsync(FileUploadedEvent, CancellationToken)

Runs after a file has been successfully stored.

##### Declaration

    Task OnFileUploadedAsync(FileUploadedEvent e, CancellationToken ct = default)

##### Parameters

Type | Name | Description
--- | --- | ---
FileUploadedEvent | e |
CancellationToken | ct |

##### Returns

Type | Description
--- | ---
Task |

#### OnFileValidatingAsync(FileValidatingEvent, CancellationToken)

Runs before a file is accepted. Set Cancel to reject the upload.

##### Declaration

    Task OnFileValidatingAsync(FileValidatingEvent e, CancellationToken ct = default)

##### Parameters

Type | Name | Description
--- | --- | ---
FileValidatingEvent | e |
CancellationToken | ct |

##### Returns

Type | Description
--- | ---
Task |