Image
Class that represents image attachments.
Image attachments are supported for inbound and outbound messages.
Constructors
Image
fun Image(file: File
):
Creates an image attachment for a message.
Throws IllegalArgumentException if
- the file MIME type is not one of the KitChat.SUPPORTED_IMAGE_MIME_TYPES.
- the file size exceeds KitChat.MAX_FILE_SIZE.
Parameters
file:
File
File object.
Methods
equals
fun equals(other: Any?
): Boolean
Parameters
other:
Any?
Optional
Returns
type:
Boolean
hashCode
fun hashCode(): Int
Returns
type:
Int
toString
fun toString(): String
Returns
type:
String
Props
id
val id: Long?
Attachment id.
Available only if a message with this attachment is successfully sent.
Returns
type:
Long?
mimeType
val mimeType: String
Image file MIME type.
Returns
type:
String
name
val name: String
Image file name.
Returns
type:
String
requestId
val requestId: String?
Temporary attachment id.
Available only if a message with this attachment is sent from an application.
Returns
type:
String?
size
val size: Long
Image file size.
Returns
type:
Long
url
val url: String?
URL to download the image file.
Returns
type:
String?