From 1f8f25c03882c1455d8cc823ce3e51ee3f362a26 Mon Sep 17 00:00:00 2001 From: sim1222 Date: Thu, 18 Jul 2024 10:58:21 +0900 Subject: [PATCH] fix chunk size --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 548a5ec..4d5c60e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -430,11 +430,11 @@ async fn multipart_upload( let this_chunk = if chunk_count - 1 == chunk_index { size_of_last_chunk } else { - CHUNK_SIZE as u64 + chunk_size }; let stream = ByteStream::read_from() .path(file.file.clone()) - .offset(chunk_index * CHUNK_SIZE as u64) + .offset(chunk_index * chunk_size) .length(Length::Exact(this_chunk)) .build() .await