Skip to content

Commit

Permalink
Fixed the chunk ordering of s3 multi-part uploads
Browse files Browse the repository at this point in the history
Signed-off-by: Navneet Verma <[email protected]>
  • Loading branch information
navneet1v committed Jan 1, 2025
1 parent b4bac5e commit 9cbc493
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -269,7 +270,7 @@ public long uploadWithProgress(final InputStream inputStream, final String key)
// totalBytesUploaded += partData.length;
// progressCallback.onProgress(totalBytesUploaded);
}

completedParts.sort(Comparator.comparingInt(CompletedPart::partNumber));
// Complete the multipart upload
CompletedMultipartUpload completedMultipartUpload = CompletedMultipartUpload.builder().parts(completedParts).build();

Expand Down

0 comments on commit 9cbc493

Please sign in to comment.