If needed, you can track the progress of file upload using uploadFile(). The result would give the URL of the uploaded image that could be set as fileUrl in FileMessageCreateParams to send a file message.
uploadFile()
fileUrl
FileMessageCreateParams
const { requestId, url, } = await channel.uploadFile({ file, uploadStartedHandler: (requestId: string) => { // upload got started }, progressHandler: (requestId: string, progress: number, total: number) => { // progress in percentage = progress / total }, }); channel.sendFileMessage({ fileUrl: url, ... }) ... .onSucceeded((message: FileMessage) => { // message is sent successfully ... })