Interface MediaEntry

A media file entry representing one file uploaded via insert. It maps to a directory on GCS hosting different variant of the uploaded file.

Hierarchy

  • MediaEntry

Properties

getFile: ((variant?: string) => File)

Type declaration

    • (variant?: string): File
    • Returns the variant file's GCS File. Throws if the provided variant does not exist on GCS.

      Parameters

      • Optional variant: string

        The name of the variant. Defaults to original if not provided.

      Returns File

getUrl: ((variant?: string) => string)

Type declaration

    • (variant?: string): string
    • Variant file's public URL. Throws if the provided variant does not exist on GCS.

      Parameters

      • Optional variant: string

        The name of the variant. Defaults to original if not provided.

      Returns string

id: string

The unique ID for the media entry. The ID is considered opaque; Applications should not try to decipher this ID.

type: MediaType
variants: string[]

Variants that exist on GCS for this media entry

Generated using TypeDoc