Interface InputMediaDocument

A generic file to be sent

interface InputMediaDocument {
    caption?: InputText;
    file: InputFileLike;
    fileMime?: string;
    fileName?: string;
    fileSize?: number;
    thumb?: InputFileLike;
    ttlSeconds?: number;
    type: "document";
}

Hierarchy (view full)

Properties

caption?: InputText

Caption of the media

File to be sent

fileMime?: string

Override MIME type for the file

Only applicable to newly uploaded files.

fileName?: string

Override file name for the file.

Only applicable to newly uploaded files.

fileSize?: number

Override file size for the file

Only applicable to newly uploaded files.

Thumbnail of the document.

The thumbnail should be in JPEG format and less than 200 KB in size. A thumbnail's width and height should not exceed 320 pixels. Thumbnails can't be reused and can be only uploaded as a new file.

Only applicable to newly uploaded files.

ttlSeconds?: number

TTL for the media in seconds.

Only applicable to some media types

type: "document"