Table of Contents

Class CanUploadField<T>

Namespace
AbanoubNassem.Trinity.Components.TrinityField
Assembly
AbanoubNassem.Trinity.dll

Represents a field that can be uploaded.

public abstract class CanUploadField<T> : TrinityField<T, string>, ITrinityField, IFormComponent, ICanUploadField, ITrinityComponent where T : CanUploadField<T>

Type Parameters

T

The type of the field.

Inheritance
CanUploadField<T>
Implements
Derived
Inherited Members

Constructors

CanUploadField(string)

protected CanUploadField(string columnName)

Parameters

columnName string

Fields

UploadDirectory

Gets or sets the directory where the uploaded files are stored.

protected string UploadDirectory

Field Value

string

Properties

UploadTempDirectory

Gets or sets the directory where the temporary uploaded files are stored.

protected string UploadTempDirectory { get; set; }

Property Value

string

Methods

GetUploadDirectory()

Gets the upload directory.

protected string GetUploadDirectory()

Returns

string

The directory where the uploaded files are stored.

SetUploadDirectory(string)

Sets the upload directory.

public T SetUploadDirectory(string directory)

Parameters

directory string

The directory where the uploaded files are stored.

Returns

T

The current instance of the CanUploadField<T> field.

Upload(IFormFile)

Uploads the specified file.

public abstract Task<string?> Upload(IFormFile files)

Parameters

files IFormFile

The file to upload.

Returns

Task<string>

A task representing the asynchronous operation that returns the URL of the uploaded file.