Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a media information for a message in a conversation.

Hierarchy

  • Media

Index

Accessors

category

  • get category(): MediaCategory
  • Media category, can be one of the MediaCategory values.

    Returns MediaCategory

contentType

  • get contentType(): string
  • Content type of the media.

    Returns string

filename

  • get filename(): string
  • File name. Null if absent.

    Returns string

sid

  • get sid(): string
  • Server-assigned unique identifier for the media.

    Returns string

size

  • get size(): number
  • Size of the media in bytes.

    Returns number

Methods

getCachedTemporaryUrl

  • getCachedTemporaryUrl(): Promise<string>
  • Returns cached direct content URL for the media.

    This URL will expire in several minutes. This function does not refresh the URL and can be used to query it several times without causing network traffic. If the URL becomes expired, you need to request a new one using getContentTemporaryUrl().

    Returns Promise<string>

getContentTemporaryUrl

  • getContentTemporaryUrl(): Promise<string>
  • 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 Promise<string>