Document
Class that represents document attachments.
Document attachments are supported for inbound and outbound messages.
Constructors
Document
fun Document(file: File
):
Creates a document attachment for a message.
Throws IllegalArgumentException if
- the file MIME type is not one of the KitChat.SUPPORTED_DOCUMENT_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
Document file MIME type.
Returns
type:
String
name
val name: String
Document 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
Document file size.
Returns
type:
Long
url
val url: String?
URL to download the document file.
Returns
type:
String?