# Uploading video progress returns 100 immediately

**URL:** https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931
**Category:** TS SDK
**Created:** [September 23, 2023, 5:59am UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931 "2023-09-23T05:59:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![JuanMorales](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@JuanMorales](https://forum.social.plus/u/JuanMorales)
#### Post date: [September 23, 2023, 5:59am UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/1 "2023-09-23T05:59:45Z")

</div>

Hi @SocialPlus_Support, I would like to implement a progress bar to inform users about the status of video or image uploads. However, I’m facing an issue where the callback that returns the progress always returns 100% immediately, even though the video or image has not been uploaded yet.

Here is the code snippet I’m currently testing:

```auto
FileRepository.uploadVideo(postData, feedType, percent => {
    console.log('Uploading video percent: ', percent);
  })

```

And this is my ts sdk version: **6.4.5**

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [September 25, 2023, 10:26am UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/2 "2023-09-25T10:26:39Z")

</div>

Hello, could you please try updating the sdk version to the latest one? We tested and it functional as expected.

---

<div class="post-metadata">

### Author: ![JuanMorales](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@JuanMorales](https://forum.social.plus/u/JuanMorales)
#### Post date: [September 25, 2023, 3:42pm UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/3 "2023-09-25T15:42:45Z")

</div>

Hi @SocialPlus_Support , thanks for the response, I upgraded the ts sdk to the latest version (6.9.0), unfortunately I experienced the same issue. Do you any other recommendation? Thanks.

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [September 25, 2023, 3:46pm UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/4 "2023-09-25T15:46:52Z")

</div>

Hello, do you use our uikit or built your own ui?

---

<div class="post-metadata">

### Author: ![JuanMorales](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@JuanMorales](https://forum.social.plus/u/JuanMorales)
#### Post date: [September 25, 2023, 6:41pm UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/5 "2023-09-25T18:41:51Z")

</div>

Hi @SocialPlus_Support, I built my own UI

---

<div class="post-metadata">

### Author: ![topAmity](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@topAmity](https://forum.social.plus/u/topAmity)
#### Post date: [September 27, 2023, 5:52am UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/6 "2023-09-27T05:52:46Z")

</div>

Hi Juan, If you get 100 percent right away and file data return as a response, that mean it has been uploaded successfully. However, If you only get the 100 percent, but no file data return back. Can you check your code that have you already put `await` before the function?

```auto
 const { data: file } = await FileRepository.uploadVideo(postData, feedType, percent => {
    console.log('Uploading video percent: ', percent);
  })

```

---

<div class="post-metadata">

### Author: ![JuanMorales](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@JuanMorales](https://forum.social.plus/u/JuanMorales)
#### Post date: [September 27, 2023, 2:43pm UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/7 "2023-09-27T14:43:23Z")

</div>

Hi @topAmity I used `.then` to ge the response, I attach my entire code snippet. Do you recommend async await?

```auto
const uploadVideoFile = async (data: FormData, feedType: Amity.ContentFeedType) => {
  return FileRepository.uploadVideo(data, feedType)
    .then(res => {
      return res.data?.length > 0 ? [res.data[0].fileId] : [];
    })
    .catch(e => {
      console.error('Uploading video: ', e);
      return null;
    });
};

```

---

<div class="post-metadata">

### Author: ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)
#### Post date: [September 28, 2023, 11:36am UTC](https://forum.social.plus/t/uploading-video-progress-returns-100-immediately/931/8 "2023-09-28T11:36:48Z")

</div>

Hello, yes, please use await.
