The UtilsController exposes a set of useful utilities that can be used to make some repeated tasks a bit easier Methods inside this controller can be called by window.SDK.utils.{method-name}

Constructors

Methods

  • This method can round a value to a certain precision, default is 2

    Parameters

    • val: number

      the value that needs to be rounded

    • Optionalprecision: number

      the precision of the rounding operation

    Returns EditorResponse<number>

    the rounded value as a number

  • This method can help you stage a file to the CHILI GraFx Environment API for upload.

    Parameters

    • files: File[] | Blob[]

      The Files or Blobs to stage.

    • remoteConnectorId: string

      The connector ID from Environment API to stage the files for.

    • OptionalvalidationConfiguration: UploadValidationConfiguration

      The validation configuration to use for the files.

    Returns Promise<FilePointer[]>

    Promise<FilePointer[]> referencing the staged data.