uploadAttachment

suspend fun uploadAttachment(channelType: String, channelId: String, attachment: Attachment, 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.

progressCallback

Used to listen to file upload progress, success, and failure.