Automatically detect media type based on file contents.

Photo type is only inferred for reused files, newly uploaded photos with auto will be uploaded as a document

interface InputMediaAuto {
    caption?: InputText;
    file: InputFileLike;
    fileMime?: string;
    fileName?: string;
    fileSize?: number;
    ttlSeconds?: number;
    type: "auto";
}

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.

ttlSeconds?: number

TTL for the media in seconds.

Only applicable to some media types

type: "auto"