MadelineProtoDocs/docs/TD_docs/constructors/file.md
Daniil Gentili e5a1324684 docufix
2018-04-04 23:19:57 +00:00

1.7 KiB

title description image
file Represents a file https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

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