davidmoten / aws-lightweight-client-java

A lightweight java client for the AWS API. Signs requests with AWS Version 4 and offers helpful builders.
Apache License 2.0
29 stars 1 forks source link

Allow sending requestBody as InputStream instead of byte[] #119

Closed dekelpilli closed 1 year ago

dekelpilli commented 1 year ago

This is something that's supported in other S3-compatible clients (e.g. https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/AbstractPutObjectRequest.java#L912, https://github.com/minio/minio-java/blob/master/api/src/main/java/io/minio/PutObjectArgs.java#L65) as it enables uploading large objects without needing to store them fully in memory.

If you're open to it, I could make a PR with this change.

davidmoten commented 1 year ago

This does what you want: https://github.com/davidmoten/aws-lightweight-client-java/wiki/Recipes#multipart-upload-a-file

dekelpilli commented 1 year ago

Oh, my bad, I wasn't aware that API existed. Thanks for the quick response!