File

data class File(fileId: String, fileUniqueId: String, fileSize: Int?, filePath: String?)

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. Maximum file size to download is 20 MB

Parameters

fileId

Identifier for this file, which can be used to download or reuse the file

fileUniqueId

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.

fileSize

Optional. File size, if known

filePath

Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.

Constructors

File
Link copied to clipboard
common
fun File(fileId: String, fileUniqueId: String, fileSize: Int? = null, filePath: String? = null)
Identifier for this file, which can be used to download or reuse the file

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): String
component3
Link copied to clipboard
common
operator fun component3(): Int?
component4
Link copied to clipboard
common
operator fun component4(): String?
copy
Link copied to clipboard
common
fun copy(fileId: String, fileUniqueId: String, fileSize: Int? = null, filePath: String? = null): File
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

fileId
Link copied to clipboard
common
val fileId: String
Identifier for this file, which can be used to download or reuse the file
filePath
Link copied to clipboard
common
val filePath: String? = null
Optional.
fileSize
Link copied to clipboard
common
val fileSize: Int? = null
Optional.
fileUniqueId
Link copied to clipboard
common
val fileUniqueId: String
Unique identifier for this file, which is supposed to be the same over time and for different bots.