Interface representing a platform upload transfer operation. Extends the base Upload functionality with platform-specific features.

Hierarchy

Accessors

  • get destinationFolder(): string
  • Return the current selected destination folder

    Returns string

  • set destinationFolder(relativePortalRootFolderPath: string): void
  • Parameters

    • relativePortalRootFolderPath: string

    Returns void

  • get metadata(): Record<string, unknown>
  • Gets the metadata associated with this upload.

    Returns

    The metadata object or undefined if no metadata is set.

    Returns Record<string, unknown>

  • set metadata(metadata: Record<string, unknown>): void
  • Sets the metadata to be associated with this upload. The metadata should match the format expected by the portal.

    Parameters

    • metadata: Record<string, unknown>

      The metadata object to set.

    Returns void

  • get transferId(): string
  • Returns

    The unique identifier for this transfer

    Example

    2ccc5d48-e43b-40b7-bb70-f591dc51c293
    

    Returns string

Methods

  • Opens destination folder chosen during the download initialization This launches a finder window for Mac or an explorer window for windows

    Returns

    A Promise which resolves to the files included in the upload.

    Returns Promise<LocalFile[]>

  • Attempt to add a pre-authorized list of files to the upload.

    Returns

    A Promise which resolves to the files attempted to be included in the upload. If a file is in error, it will not be added to the upload.

    Parameters

    • filePaths: string[]

      Array of absolute file paths to be attempted to be added to the upload

    • token: string

      Authorization token generated by the Platform API.

    Returns Promise<LocalFile[]>

  • Cancel the transfer. Valid in the following states:

    • STARTING,
    • QUEUED,
    • IN_PROGRESS

    Returns

    A Promise which will resolve when the transfer has canceled successfully.

    Returns Promise<void>

  • Attempt to extract technical metadata from a list of files. Files must match or be a subset of the files previously selected.

    Returns

    A Promise which resolves to an array of file metadata. If there is an error extracting the file metadata, the file's absolute path and error details will be returned in the array.

    Parameters

    • filePaths: string[]

      Array of absolute file paths to be attempted for metadata extraction.

    Returns Promise<FileMetadata[]>

  • Using a list of paths it removes the selected files whose path is in the provided array

    Parameters

    • filePaths: string[]

      paths of the files to be removed

    Returns Promise<LocalFile[]>

  • Retry the incomplete transfer. Valid in the following states

    • FAILURE
    • CANCELED

    Returns

    A Promise which will resolve when the retry has been successfully initiated.

    Returns Promise<void>

  • Start the transfer. Valid in the following states:

    • IDLE

    Returns

    A Promise which will resolve when the transfer has started successfully.

    Returns Promise<void>

  • Returns

    true when 1 or more listeners were removed.

    Returns boolean

Generated using TypeDoc