Table of Contents

Class FileReference

Namespace
GroupeIsa.Neos.Designer.UIAbstractions.API
Assembly
GroupeIsa.Neos.Designer.UIAbstractions.dll

Represents a reference to a file that is immediately uploaded.

[ExcludeFromCodeCoverage]
public class FileReference
Inheritance
FileReference
Derived
Inherited Members

Constructors

FileReference()

Initializes a new instance of the FileReference class.

protected FileReference()

Properties

FileName

Gets the file name.

public string? FileName { get; init; }

Property Value

string

Remarks

The value is only available when the reference is to a file selected by the user.

Size

Gets the file size in bytes.

public int? Size { get; init; }

Property Value

int?

UploadPercentCompleted

Gets the upload percent completed.

public decimal UploadPercentCompleted { get; }

Property Value

decimal

UploadState

Gets the upload state.

public FileUploadState UploadState { get; }

Property Value

FileUploadState

Url

Gets the file URL.

public string Url { get; }

Property Value

string

Value

Gets the value.

public string? Value { get; init; }

Property Value

string

Remarks

The value is null when the file selected by the user is not yet uploaded to the server. It becomes a GUID once the file is uploaded. When the value comes from the server, it is the file partial URL.

Methods

FromValue(ApiClient, string)

Creates a file reference from a value (a partial URL, see file data type documentation for more informations).

public static FileReference FromValue(ApiClient apiClient, string value)

Parameters

apiClient ApiClient

API client.

value string

Value (partial URL).

Returns

FileReference

The file reference.

FromValue(string)

Creates a file reference from a value (a partial URL, see file data type documentation for more informations).

[Obsolete("Use FromValue(ApiClient apiClient, string value) instead.")]
public static FileReference FromValue(string value)

Parameters

value string

Value (partial URL).

Returns

FileReference

The file reference.

RetryUpload()

Retries to upload.

[SuppressMessage("Minor Code Smell", "S2325:Methods and properties that don't access instance data should be static", Justification = "Transpilation")]
public void RetryUpload()

StartUpload()

Starts to upload.

[Obsolete("Use DeferredFileReference.StartUpload instead.")]
public void StartUpload()