MadelineProto/docs/TD_docs/constructors/file.md
Daniil Gentili 9d77dc0919 AMP fixes
2017-08-20 09:05:56 +00:00

1.2 KiB

title description
file Represents a file

Constructor: file

Back to constructors index

Represents a file

Attributes:

Name Type Required Description
id int Yes Unique file identifier, 0 for empty file
persistent_id string Yes Persistent file identifier, if exists. Can be used across application restarts or even other devices for current logged user. If begins with "http: " or "https: ", it is HTTP URL of the file. Currently, TDLib is unable to download files if only they URL is known
size int Yes File size, 0 if unknown
path string Yes Local path to the file, if available

Type: File

Example:

$file = ['_' => 'file', 'id' => int, 'persistent_id' => 'string', 'size' => int, 'path' => 'string'];

PWRTelegram json-encoded version:

{"_": "file", "id": int, "persistent_id": "string", "size": int, "path": "string"}

Or, if you're into Lua:

file={_='file', id=int, persistent_id='string', size=int, path='string'}