Skip to content

miniproto.media.upload.MediaUploadResult

MediaUploadResult(file_id: int, name: str, size: int, parts: int, part_size: int, big: bool, input_file: types.InputFile | types.InputFileBig, md5_checksum: str | None = None) -> None

Upload metadata and the MTProto input-file reference to reuse.

Attributes:

  • file_id (int) – Generated ID or int(file_id) supplied by the caller, including zero.
  • name (str) – File name sent to Telegram.
  • size (int) – Source size measured before part transfer, in bytes.
  • parts (int) – Part count in the returned input-file reference.
  • part_size (int) – Final part size in bytes, a KiB-aligned divisor of 512 KiB.
  • big (bool) – Whether the measured source size exceeds 10 MiB.
  • input_file (InputFile | InputFileBig) – Matching Telegram small or big input-file reference.
  • md5_checksum (str | None) – Small-file MD5 of uploaded bytes, otherwise None.