uploadAttachment
suspend fun uploadAttachment(channelType: String, channelId: String, attachment: Attachment, messageId: String? = null, progressCallback: ProgressCallback? = null): Result<Attachment>
Uploads the given attachment.
Return
The resulting uploaded attachment.
Parameters
channelType
The type of the channel.
channelId
The ID of the channel.
attachment
The attachment to be uploaded.
messageId
The id of the message the attachment belongs to, or null when the upload is not part of sending a message.
progressCallback
Used to listen to file upload progress, success, and failure.