# Sometime we retrieve 0 Kb file size

**URL:** https://community.sendbird.com/t/sometime-we-retrieve-0-kb-file-size/1139
**Category:** Android
**Tags:** syncmanager, chatsdk
**Created:** [October 14, 2020, 9:45am UTC](https://community.sendbird.com/t/sometime-we-retrieve-0-kb-file-size/1139 "2020-10-14T09:45:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wildhansatriady](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/wildhansatriady/32/603_2.png) [@wildhansatriady](https://community.sendbird.com/u/wildhansatriady)
#### Post date: [October 14, 2020, 9:45am UTC](https://community.sendbird.com/t/sometime-we-retrieve-0-kb-file-size/1139/1 "2020-10-14T09:45:49Z")

</div>

Hi, I have a problem when trying to download a file but then the file size is zero kilobytes. I’ve checked the original file from my local phone the size it’s not zero, but when I upload it and download it on another device it’s zero.

---

<div class="post-metadata">

### Author: ![Cjeon](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/cjeon/32/222_2.png) [@Cjeon](https://community.sendbird.com/u/Cjeon)
#### Post date: [October 14, 2020, 10:07am UTC](https://community.sendbird.com/t/sometime-we-retrieve-0-kb-file-size/1139/2 "2020-10-14T10:07:13Z")

</div>

Hi @wildhansatriady. Thank you for contacting us. I took a look at file message sending logics and I found out that

1. if you send a file message with url, the filesize can be 0.
2. if you send a file message with File instance, the filesize can be 0 when the file does not exist or the operating system denied access.

Did you try explicitly setting filesize like below? (you can get file size by `File#length()`)

```java
FileMessageParams params = new FileMessageParams()
        .setFile(FILE)       
        .setFileSize(FILE_SIZE);

```

if you share your code here it would be really helpful for me to find out what is going on.

Thank you for contacting us and please let me know if your problem is not solved!
