Fix calculating file size

i am incredibly dumb
This commit is contained in:
blank X 2021-06-26 10:17:42 +07:00
parent e6b44d8dbf
commit 55420793e6
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 1 deletions

View File

@ -666,7 +666,7 @@ pub async fn upload_worker(
}
};
}
let mut size = file.stream_position().await.unwrap();
let mut size = total_size - file.stream_position().await.unwrap();
if size > 2000 * 1024 * 1024 {
size = 2000 * 1024 * 1024;
}