File
This object represents a file ready to be downloaded. The file can be downloaded via the link https://tapi.bale.ai/file/bot<token>/<file_path>
.
📝 Schema
Field | Type | Description |
---|---|---|
file_id | string | Identifier for this file, which can be used to download or reuse the file |
file_unique_id | string | Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. |
file_size | Integer | Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this value. |
file_path | string | Optional. File path. Use https://tapi.bale.ai/file/bot<token>/<file_path> to get the file. |
⚙️ Get methods
getFileId()
Retrieves the file_id of the file.
$fileFileId = $fileObject->getFileId();
getFileUniqueId()
Retrieves the file_unique_id of the file.
$fileFileUniqueId = $fileObject->getFileUniqueId();
getFileSize()
Retrieves the file_size of the file.
$fileFileSize = $fileObject->getFileSize();
getFilePath()
Retrieves the file_path of the file.
$fileFilePath = $fileObject->getFilePath();
➕ More
tip
For further information, refer to the official Bale documentation for more details.