fix chunk size

This commit is contained in:
sim1222 2024-07-18 10:58:21 +09:00
parent ac6603c22b
commit 1f8f25c038
Signed by: sim1222
GPG Key ID: D1AE30E316E44E5D

View File

@ -430,11 +430,11 @@ async fn multipart_upload(
let this_chunk = if chunk_count - 1 == chunk_index { let this_chunk = if chunk_count - 1 == chunk_index {
size_of_last_chunk size_of_last_chunk
} else { } else {
CHUNK_SIZE as u64 chunk_size
}; };
let stream = ByteStream::read_from() let stream = ByteStream::read_from()
.path(file.file.clone()) .path(file.file.clone())
.offset(chunk_index * CHUNK_SIZE as u64) .offset(chunk_index * chunk_size)
.length(Length::Exact(this_chunk)) .length(Length::Exact(this_chunk))
.build() .build()
.await .await