Slowly uploading chat image files

const fileObject = files[0];
const params = {
file: fileObject,
fileName: fileObject.name,
fileSize: fileObject.size,
mimeType: fileObject.type,
thumbnailSizes: [{ maxWidth: 200, maxHeight: 200 }],
};
const channel = useChat.useChannel;
console.log(params);
console.log(channel);
channel.sendFileMessage(params).onSucceeded(FileMessage => {
addMessage(FileMessage);
});

The upload file is 3MB ‘sendFileMessage’ request/response takes 6-10 seconds, is there any way to improve it?
AddMessage is a function that adds an upload image to the message list