MadelineProto/docs/TD_docs/constructors/file.md
Daniil Gentili 43adf77378 docufix
2017-12-21 20:08:25 +00:00

1.6 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
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.-If downloadFile is called on a such file or it is sended to a secret chat TDLib starts file generation process by sending to the client updateFileGenerationStart with HTTP URL in the original_path and "#url#" as conversion string. Client supposed to generate the file by downloading it to the specified location
size int Yes File size, 0 if unknown
is_being_downloaded Bool Yes True, if the file is currently being downloaded
local_size int Yes Size of locally available part of the file. If size != 0 && local_size == size, full file is available locally
is_being_uploaded Bool Yes True, if the file is currently being uploaded
remote_size int Yes Size of remotely available part of the file. If size != 0 && remote_size == size, the file is available remotely
path string Yes Local path to the available file part, may be empty

Type: File