Link Search Menu Expand Document

Constructor: inputMediaUploadedDocument

Back to constructors index

New document

Attributes:

NameTypeRequiredDescription
nosound_videoBoolOptionalWhether to send the file as a video even if it doesn’t have an audio track (i.e. if set, the documentAttributeAnimated attribute will not be set even for videos without audio)
force_fileBoolOptionalForce the media file to be uploaded as document
spoilerBoolOptionalWhether this media should be hidden behind a spoiler warning
fileFile path or InputFileYesThe uploaded file
thumbFile path or InputFileOptionalThumbnail of the document, uploaded as for the file
mime_typestringOptionalMIME type of document
attributesArray of DocumentAttributeYesAttributes that specify the type of the document (video, audio, voice, sticker, etc.)
stickersArray of MessageMedia, Message, Update or InputDocumentOptionalAttached stickers
video_coverMessageMedia, Message, Update or InputPhotoOptionalStart playing the video at the specified timestamp (seconds).
video_timestampintOptionalStart playing the video at the specified timestamp (seconds).
ttl_secondsintOptionalTime to live in seconds of self-destructing document

Type: InputMedia

Example:

$inputMediaUploadedDocument = ['_' => 'inputMediaUploadedDocument', 'nosound_video' => Bool, 'force_file' => Bool, 'spoiler' => Bool, 'file' => InputFile, 'thumb' => InputFile, 'mime_type' => 'string', 'attributes' => [DocumentAttribute, DocumentAttribute], 'stickers' => [InputDocument, InputDocument], 'video_cover' => InputPhoto, 'video_timestamp' => int, 'ttl_seconds' => int];