Skip to content

getRemoteFile

Sahri Riza Umami edited this page Jul 1, 2018 · 1 revision

Returns information about a file by its remote ID; this is an offline request.
Can be used to register a URL as a file for further uploading, or sending as a message.

getRemoteFile(remote_file_id, file_type, callback, data)
Field Type Description
remote_file_id string Remote identifier of the file to get.
file_type string File type, if known.

Example

  • Get information about file by its remote ID BQADBQADMwADZ6iIVP8uNDg5w69vAg.

    getRemoteFile(BQADBQADMwADZ6iIVP8uNDg5w69vAg)

    Response:

    {
      ["@type"] = "file",
      expected_size = 1027,
      id = 23,
      ["local"] = {
        ["@type"] = "localFile",
        can_be_deleted = false,
        can_be_downloaded = true,
        downloaded_prefix_size = 0,
        downloaded_size = 0,
        is_downloading_active = false,
        is_downloading_completed = false,
        path = ""
      },
      remote = {
        ["@type"] = "remoteFile",
        id = "BQADBQADMwADZ6iIVP8uNDg5w69vAg",
        is_uploading_active = false,
        is_uploading_completed = true,
        uploaded_size = 1027
      },
      size = 1027
    } 

Frequently Asked Questions
The Functions

Clone this wiki locally