Class ResourceComponent<TResourceName>

Represents a component of type Resource Can be used to upload data Requires a component where "user upload" is enabled (can be enabled when creating the component)

Type Parameters

  • TResourceName extends string

Hierarchy

  • ResourceComponent

Constructors

Properties

Methods

Constructors

  • Type Parameters

    • TResourceName extends string

    Parameters

    • name: string

    Returns ResourceComponent<TResourceName>

Properties

name: string

Methods

  • Upload a single resource into a component It is executed asynchronous and provides a Promise which resolves when the resource upload has been finished and rejects if the upload has failed.

    Returns

    upload state of the resource

    Example

    MyResCmp.upload('screenshot', new File([], 'myfile.txt'));
    

    Parameters

    Returns Promise<UploadState>

  • Upload multiple resources into a component It is executed asynchronous and provides a Promise which resolves when the resource upload has been finished and rejects if the upload has failed.

    Returns

    upload state of the individual resources

    Example

    MyResCmp.uploadMultiple({ screenshot: new File([], 'myfile.txt'));
    

    Type Parameters

    Parameters

    • resources: T

    Returns Promise<UploadStateMap<keyof T & string>>

Generated using TypeDoc