MediaExtended interface that extends the Media interface with additional properties and methods.

interface MediaExtended {
    _id: string;
    altText: string;
    caption: string;
    createdAt: number;
    hasChildren: boolean;
    height: number;
    isInRoot: boolean;
    mimetype: string;
    name: string;
    parentId: string;
    size: number;
    svg?: string;
    type: MediaType;
    updatedAt: number;
    userId: string;
    width: number;
    bin(options?: MediaGetBinBodyImage): Promise<Buffer>;
    thumbnail(): Promise<Buffer>;
}

Hierarchy

  • Media
    • MediaExtended

Properties

_id: string
altText: string
caption: string
createdAt: number
hasChildren: boolean
height: number
isInRoot: boolean
mimetype: string
name: string
parentId: string
size: number
svg?: string

Optional string variable representing the SVG content.

type: MediaType
updatedAt: number
userId: string
width: number

Methods

  • Retrieves a binary representation of media based on provided options.

    Parameters

    • Optionaloptions: MediaGetBinBodyImage

      An optional configuration object to specify the details for media retrieval.

    Returns Promise<Buffer>

    A promise that resolves to a Buffer containing the binary data of the media.

  • Retrieves a thumbnail for a given media item.

    Returns Promise<Buffer>

    A promise that resolves with the generated thumbnail as a Buffer.