Class SdkFile

Represents a file that has been loaded into memory from a base64-encoded data string.

Hierarchy

  • SdkFile

Constructors

Properties

data: string

The base64-encoded data for the file.

lastModified: number

Last modified time, in ms from epoch.

name: string

Name of the file.

size: number

Size in bytes.

type: string

MIME type.

webkitRelativePath: string

Relative path to the file.

Methods

  • Reads the data stream to completion, and returns it as ArrayBuffer.

    Returns Promise<ArrayBuffer>

  • Returns a new File with only data in the given range of bytes.

    Parameters

    • Optional start: number

      The start index of the byte range.

    • Optional end: number

      The end index of the byte range.

    • Optional type: string

      The type of the sliced file. Default is an empty string.

    Returns SdkFile

    A new File object with the sliced data.

  • Reads the data stream to completion, and returns it as string.

    Returns Promise<string>

Generated using TypeDoc