InputFile
in package
AbstractYes
Standalone abstract — InputFile is intentionally NOT a TelegramObject. Upstream aiogram declares `class InputFile(ABC)` (aiogram/types/input_file.py); attaching it to the TelegramObject tree would make it eligible for Serializer dump/load, which is wrong: InputFile values are detached by `BaseSession::prepareValue` into the multipart `$files` channel and never go through JSON.
Table of Contents
Constants
- DEFAULT_CHUNK_SIZE : int = 65536
Properties
- $chunkSize : int
- $filename : string|null
Methods
- __construct() : mixed
- read() : ReadableStream
- Returns a Fiber-aware readable stream of file bytes.
Constants
DEFAULT_CHUNK_SIZE
public
int
DEFAULT_CHUNK_SIZE
= 65536
Properties
$chunkSize read-only
public
int
$chunkSize
= self::DEFAULT_CHUNK_SIZE
$filename read-only
public
string|null
$filename
= null
Methods
__construct()
public
__construct([string|null $filename = null ][, int $chunkSize = self::DEFAULT_CHUNK_SIZE ]) : mixed
Parameters
- $filename : string|null = null
- $chunkSize : int = self::DEFAULT_CHUNK_SIZE
read()
Returns a Fiber-aware readable stream of file bytes.
public
abstract read(Bot $bot) : ReadableStream
Parameters
- $bot : Bot