Skip to content

addFileToDownloads

Function · TDLib 1.8.67 · d1085f9c

Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file

addFileToDownloads(
  file_id: int32,
  chat_id: int53,
  message_id: int53,
  priority: int32
) → File

file_id

int32

Identifier of the file to download

chat_id

int53

Chat identifier of the message with the file

message_id

int53

Message identifier

priority

int32

Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first