Skip to main content

Module media

Module media 

Source
Expand description

Media upload, download, and typed wrappers.

§Upload

§Download

§Typed wrappers

Photo, Document, Sticker: typed wrappers over raw TL types.

§Downloadable trait

Downloadable: implemented by Photo, Document, Sticker so you can pass any of them to iter_download / download_media.

Structs§

AlbumItem
A single item in a multi-media album send.
Document
Typed wrapper over a Telegram document (file, video, audio).
DownloadIter
Sequential chunk-by-chunk download iterator.
Photo
Typed wrapper over a Telegram photo.
Sticker
Typed wrapper over a Telegram sticker.
UploadedFile
A successfully uploaded file handle, ready to be sent as media.

Constants§

DOWNLOAD_CHUNK_SIZE
UPLOAD_CHUNK_SIZE
Chunk size used for uploads and downloads (512 KB).

Traits§

Downloadable
Something that can be downloaded via Client::iter_download.

Functions§

download_location_from_media
Extract a download [InputFileLocation] from a raw MessageMedia reference.