# Slowly uploading chat image files

**URL:** <https://community.sendbird.com/t/slowly-uploading-chat-image-files/9426>\
**Category:** Miscellaneous\
**Created:** [April 21, 2024, 10:29pm UTC](https://community.sendbird.com/t/slowly-uploading-chat-image-files/9426 "2024-04-21T22:29:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Contact\_Diving\_Buddy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/contact_diving_buddy/32/5112_2.png) [@Contact\_Diving\_Buddy](https://community.sendbird.com/u/Contact_Diving_Buddy)\
**Post date:** [April 21, 2024, 10:29pm UTC](https://community.sendbird.com/t/slowly-uploading-chat-image-files/9426/1 "2024-04-21T22:29:35Z")

</div>

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
