# sendFileMessage is not working in Sendbird Chat SDK V4 for react-native

**URL:** https://community.sendbird.com/t/sendfilemessage-is-not-working-in-sendbird-chat-sdk-v4-for-react-native/6084
**Category:** JavaScript
**Created:** [December 1, 2022, 2:41am UTC](https://community.sendbird.com/t/sendfilemessage-is-not-working-in-sendbird-chat-sdk-v4-for-react-native/6084 "2022-12-01T02:41:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mpikhovsky](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mpikhovsky](https://community.sendbird.com/u/mpikhovsky)
#### Post date: [December 1, 2022, 2:41am UTC](https://community.sendbird.com/t/sendfilemessage-is-not-working-in-sendbird-chat-sdk-v4-for-react-native/6084/1 "2022-12-01T02:41:13Z")

</div>

## **[Problem/Question]** When the function is called, it throws an error “Connection is required, please reconnect”. But the connection is open and sendUserMessage function works well. Hi Sendbird Team, What is the issue? I have been developing some apps using Sendbird Chat & Desk & Call. Please take a look at the issue.

**[SDK Version]**  
@sendbird/chat 4.1.5  
// Here is my code  
**const params = {**  
\*\* file: file, // Or .fileUrl = FILE\_URL (You can also send a file message with a file URL.)\*\*  
\*\* thumbnailSizes: [{maxWidth: 200, maxHeight: 200}],\*\*  
\*\* };\*\*  
\*\* channel.sendFileMessage(params)\*\*  
\*\* .onSucceeded((message) =\> {\*\*  
\*\* console.log(message);\*\*  
\*\* })\*\*  
\*\* .onFailed(error =\> {\*\*  
\*\* console.log(error);\*\*  
\*\* });\*\*
