@twilio/flex-sdk
    Preparing search index...

    Interface Media

    Represents a media information for a message in a conversation.

    interface Media {
        get category(): MediaCategory;
        get contentType(): string;
        get filename(): string | null;
        get sid(): string;
        get size(): number;
        _state(): MediaState;
        getContentTemporaryUrl(): CancellablePromise<string | null>;
    }
    Index

    Accessors

    • get category(): MediaCategory

      Media category, can be one of the MediaCategory values.

      Returns MediaCategory

    • get contentType(): string

      Content type of the media.

      Returns string

    • get filename(): string | null

      File name. Null if absent.

      Returns string | null

    • get sid(): string

      Server-assigned unique identifier for the media.

      Returns string

    • get size(): number

      Size of the media in bytes.

      Returns number

    Methods

    • Internal

      Returns MediaState

    • Returns the direct content URL for the media.

      This URL is impermanent, it will expire in several minutes and cannot be cached. If the URL becomes expired, you need to request a new one. Each call to this function produces a new temporary URL.

      Returns CancellablePromise<string | null>