Expand description
Media upload and download support.
§Upload
Use Client::upload_file to upload a file from a byte buffer or
Client::upload_stream for streamed uploads. The returned UploadedFile
can be passed to Client::send_file or Client::send_album.
§Download
Use Client::download_media to collect all bytes of a media attachment, or
Client::iter_download for chunk-by-chunk streaming.
Structs§
- Download
Iter - Iterator that downloads a media file chunk by chunk.
- Uploaded
File - A successfully uploaded file, ready to be sent as media.
Constants§
- DOWNLOAD_
CHUNK_ SIZE - Maximum chunk size for file downloads (512 KB).
- UPLOAD_
CHUNK_ SIZE - Maximum chunk size for file uploads (512 KB).