Skip to content

Commit

Permalink
fix upload_id
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Dec 23, 2024
1 parent 1586187 commit 736fbe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aws-s3-transfer-manager/src/operation/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ async fn try_start_mpu_upload(
mpu.upload_id
);
let upload_id = mpu.upload_id.clone().expect("upload_id is present");

let mut mpu_data = MultipartUploadData {
upload_part_tasks: Default::default(),
read_body_tasks: Default::default(),
response: Some(mpu),
upload_id: upload_id.clone(),
};
distribute_work(&mut mpu_data, ctx, stream, part_size, upload_id)?;

distribute_work(&mut mpu_data, ctx, stream, part_size)?;
Ok(UploadType::MultipartUpload(mpu_data))
}

Expand Down
3 changes: 1 addition & 2 deletions aws-s3-transfer-manager/src/operation/upload/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ pub(super) fn distribute_work(
ctx: UploadContext,
stream: InputStream,
part_size: u64,
upload_id: String,
) -> Result<(), error::Error> {
let part_reader = Arc::new(
PartReaderBuilder::new()
Expand Down Expand Up @@ -135,7 +134,7 @@ pub(super) fn distribute_work(
let worker = read_body(
part_reader.clone(),
ctx.clone(),
upload_id.clone(),
mpu_data.upload_id.clone(),
svc.clone(),
mpu_data.upload_part_tasks.clone(),
parent_span_for_upload_tasks.clone(),
Expand Down

0 comments on commit 736fbe4

Please sign in to comment.