Interface AddFileToDownloads

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. Request type for Tdjson#addFileToDownloads.

interface AddFileToDownloads {
    @type: "addFileToDownloads";
    chat_id: number;
    file_id: number;
    message_id: number;
    priority: number;
}

Properties

@type: "addFileToDownloads"
chat_id: number

Chat identifier of the message with the file.

file_id: number

Identifier of the file to download.

message_id: number

Message identifier.

priority: number

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.