Skip to main content

Module media

Module media 

Source
Expand description

Media upload, download, and typed media wrappers (G-41 / G-42 / G-43 / G-44).

§Upload

§Download

§Typed wrappers (G-43)

Photo, Document, Sticker — ergonomic accessors over raw TL types.

§Downloadable trait (G-44)

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

Structs§

Document
Ergonomic wrapper over a Telegram document (file, video, audio, …).
DownloadIter
Sequential chunk-by-chunk download iterator.
Photo
Ergonomic wrapper over a Telegram photo.
Sticker
Ergonomic wrapper over a Telegram sticker (a document with sticker attributes).
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.