When I am uploading inputStream object to s3 synchronously (blocking way) it works.
S3Client s3Client = S3Client.builder().build();
s3Client.putObject(objectRequest, RequestBody.fromInputStream(inputStream,STREAM_SIZE));
but when I try the same with S3AsyncClient there is no .fromInputStream method on AsyncRequestBody.
S3AsyncClient s3AsyncClient = S3AsyncClient.builder().build();
s3AsyncClient.putObject(objectRequest, AsyncRequestBody.fromInputStream(inputStream,STREAM_SIZE)); // error no method named 'fromInputStream'
And I can't use .fromByteBuffer as it will load the entire stream into memory, which I don't want.
I am interested why there is no method to read from InputStream in AsyncRequestBody. And Is there any alternatives?