InputMediaUploadedDocument

class pyrogram.raw.types.InputMediaUploadedDocument

New document

Constructor of InputMedia.

Details:
  • Layer: 227

  • ID: 37C9330

Parameters:
  • file (InputFile) – The uploaded file

  • mime_type (str) – MIME type of document

  • attributes (List of DocumentAttribute) – Attributes that specify the type of the document (video, audio, voice, sticker, etc.)

  • nosound_video (bool, optional) – Whether 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_file (bool, optional) – Force the media file to be uploaded as document

  • spoiler (bool, optional) – Whether this media should be hidden behind a spoiler warning

  • thumb (InputFile, optional) – Thumbnail of the document, uploaded as for the file

  • stickers (List of InputDocument, optional) – Attached stickers

  • video_cover (InputPhoto, optional) – Start playing the video at the specified timestamp (seconds).

  • video_timestamp (int 32-bit, optional) – Start playing the video at the specified timestamp (seconds).

  • ttl_seconds (int 32-bit, optional) – Time to live in seconds of self-destructing document

TL Schema

inputMediaUploadedDocument#37c9330
flags:#
nosound_video:flags.3?true
force_file:flags.4?true
spoiler:flags.5?true
file:InputFile
thumb:flags.2?InputFile
mime_type:string
attributes:Vector<DocumentAttribute>
stickers:flags.0?Vector<InputDocument>
video_cover:flags.6?InputPhoto
video_timestamp:flags.7?int
ttl_seconds:flags.1?int

= InputMedia

Parameter Tree

InputMediaUploadedDocument
├── nosound_video → true (optional)
├── force_file → true (optional)
├── spoiler → true (optional)
├── file → InputFile
│ ├── InputFile
│ │ ├── id → long
│ │ ├── parts → int
│ │ ├── name → string
│ │ └── md5_checksum → string
│ ├── InputFileBig
│ │ ├── id → long
│ │ ├── parts → int
│ │ └── name → string
│ └── id → InputDocument
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── id → long
│ ├── access_hash → long
│ └── file_reference → bytes
├── thumb → InputFile (optional)
│ ├── InputFile
│ │ ├── id → long
│ │ ├── parts → int
│ │ ├── name → string
│ │ └── md5_checksum → string
│ ├── InputFileBig
│ │ ├── id → long
│ │ ├── parts → int
│ │ └── name → string
│ └── id → InputDocument
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── id → long
│ ├── access_hash → long
│ └── file_reference → bytes
├── mime_type → string
├── attributes → Vector < DocumentAttribute >
│ │ ├── w → int
│ │ └── h → int
│ │ ├── mask → true (optional)
│ │ ├── alt → string
│ │ ├── stickerset → InputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ │ ├── id → long
│ │ │ │ └── access_hash → long
│ │ │ ├── InputStickerSetShortName
│ │ │ │ └── short_name → string
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ │ └── emoticon → string
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── mask_coords → MaskCoords (optional)
│ │ └── MaskCoords
│ │ ├── n → int
│ │ ├── x → double
│ │ ├── y → double
│ │ └── zoom → double
│ │ ├── round_message → true (optional)
│ │ ├── supports_streaming → true (optional)
│ │ ├── nosound → true (optional)
│ │ ├── duration → double
│ │ ├── w → int
│ │ ├── h → int
│ │ ├── preload_prefix_size → int (optional)
│ │ ├── video_start_ts → double (optional)
│ │ └── video_codec → string (optional)
│ │ ├── voice → true (optional)
│ │ ├── duration → int
│ │ ├── title → string (optional)
│ │ ├── performer → string (optional)
│ │ └── waveform → bytes (optional)
│ │ └── file_name → string
│ ├── free → true (optional)
│ ├── text_color → true (optional)
│ ├── alt → string
│ └── stickerset → InputStickerSet
│ ├── InputStickerSetEmpty
│ ├── InputStickerSetID
│ │ ├── id → long
│ │ └── access_hash → long
│ │ └── short_name → string
│ ├── InputStickerSetDice
│ │ └── emoticon → string
├── stickers → Vector < InputDocument > (optional)
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── id → long
│ ├── access_hash → long
│ └── file_reference → bytes
├── video_cover → InputPhoto (optional)
│ ├── InputPhotoEmpty
│ └── InputPhoto
│ ├── id → long
│ ├── access_hash → long
│ └── file_reference → bytes
├── video_timestamp → int (optional)
└── ttl_seconds → int (optional)

Example

InputMediaUploadedDocument(
    file=InputFile(
        id=0,
        parts=0,
        name="text",
        md5_checksum="text"
    ),
    mime_type="text",
    attributes=[
            DocumentAttributeImageSize(
                w=0,
                h=0
            )
        ],
)