Skip to content

getFile

Sahri Riza Umami edited this page Jul 1, 2018 · 5 revisions

Returns information about a file; this is an offline request.

getFile(file_id, callback, data)
Field Type Description
file_id int32 Identifier of the file to get

Example

  • Returns information about a file with id 262.

    getFile(262)

    Response:

    {
      ["@type"] = "file",
      expected_size = 1027,
      id = 262,
      ["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