Rate this page:

Document

Class that represents document attachments.

Document attachments are supported for inbound and outbound messages.

Constructors

Document
Copy URL
Document(file: 

File

)

Creates a document attachment for a message.

Throws IllegalArgumentException if

Parameters

  • file:

    File

    File object.

Throws

IllegalArgumentException if the file MIME type is not one of the KitChat.SUPPORTED_DOCUMENT_MIME_TYPES or the file size exceeds KitChat.MAX_FILE_SIZE.

Methods

equals
Copy URL
fun equals(other: 

Any?

):

Boolean

Parameters

  • other:

    Any?

Returns

  • type:

    Boolean

hashCode
Copy URL
fun hashCode(): 

Int

Returns

  • type:

    Int

toString
Copy URL
fun toString(): 

String

Returns

  • type:

    String

Props

id
Read-only
Copy URL
val id: 

Long?

Attachment id.

Available only if a message with this attachment is successfully sent.

Returns

  • type:

    Long?

mimeType
Read-only
Copy URL
val mimeType: 

String

Document file MIME type.

Returns

  • type:

    String

name
Read-only
Copy URL
val name: 

String

Document file name.

Returns

  • type:

    String

requestId
Read-only
Copy URL
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
Copy URL
val size: 

Long

Document file size.

Returns

  • type:

    Long

url
Read-only
Copy URL
val url: 

String?

URL to download the document file.

Returns

  • type:

    String?

Rate this page: