telegram.inputfile module¶
This module contains an object that represents a Telegram InputFile.
-
class
telegram.inputfile.InputFile(data)¶ Bases:
objectThis object represents a Telegram InputFile.
-
static
is_image(stream)¶ Check if the content file is an image by analyzing its headers.
Parameters: stream (str) – A str representing the content of a file. Returns: The str mimetype of an image. Return type: str
-
static
is_inputfile(data)¶ Check if the request is a file request.
Parameters: data (dict) – A dict of (str, unicode) key/value pairs Returns: bool
-
to_form()¶ Returns: Return type: str
-
static