UploadOptions: {
    chunkSize?: number;
    contentType?: string;
    dashboard?: string;
    fieldId?: string;
    isPublic?: boolean;
    maxTriesForEachChunk?: number;
    onCancelToken?: ((cancel) => any);
    onProgress?: ((percentage) => any);
    timeoutForEachFailedChunk?: number;
    widget?: string;
}

Type declaration

  • Optional chunkSize?: number

    the byte size of each chunk sent to TagoIO. This will influence how many requests this function will perform

  • Optional contentType?: string

    The file's content type. This is optional

  • Optional dashboard?: string

    Dashboard ID.

    Uploading files from a widget requires dashboard, widget, and fieldId to be provided.

  • Optional fieldId?: string

    ID of the field from the widget where the file is selected.

    Uploading files from a widget requires dashboard, widget, and fieldId to be provided.

  • Optional isPublic?: boolean

    if the file can be accessed by anybody with a link or not

  • Optional maxTriesForEachChunk?: number

    the maximum amount of tries to upload each chunk to TagoIO. After this many unsuccessful tries of a single chunk, the upload is aborted

  • Optional onCancelToken?: ((cancel) => any)

    will provide a cancel token for you to cancel the request

      • (cancel): any
      • Parameters

        • cancel: (() => void)
            • (): void
            • Returns void

        Returns any

  • Optional onProgress?: ((percentage) => any)

    will provide the upload percentage for this file

      • (percentage): any
      • Parameters

        • percentage: number

        Returns any

  • Optional timeoutForEachFailedChunk?: number

    timeout before trying to upload the same chunk if the request failed

  • Optional widget?: string

    Widget ID.

    Uploading files from a widget requires dashboard, widget, and fieldId to be provided.