InputFile¶
- class aiogram.types.input_file.InputFile(filename: str | None = None, chunk_size: int = 65536)[source]¶
This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
- class aiogram.types.input_file.BufferedInputFile(file: bytes, filename: str, chunk_size: int = 65536)[source]¶
- classmethod from_file(path: str | Path, filename: str | None = None, chunk_size: int = 65536) BufferedInputFile [source]¶
Create buffer from file
- Parameters:
path – Path to file
filename – Filename to be propagated to telegram. By default, will be parsed from path
chunk_size – Uploading chunk size
- Returns:
instance of
BufferedInputFile