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