STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented Exception when upload

For Workes & Pages, what is the name of the domain?

no

What is the error number?

501

What is the error message?

com.amazonaws.services.s3.model.AmazonS3Exception: STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented

What is the issue or error you’re encountering

STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented Exception when upload

What are the steps to reproduce the issue?

I’m using aws s3 android sdk to upload image to R2,the code is:
fun uploadBitmap(bitmap: Bitmap, fullPath: String){
val s3Client = buildS3Client(DEFAULT_CONFIG)
val outputStream = ByteArrayOutputStream()
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, outputStream)
val byteArray = outputStream.toByteArray()
val metadata = ObjectMetadata()
metadata.contentType = “image/jpeg”
metadata.contentLength = byteArray.size.toLong()
val putObjectRequest = PutObjectRequest(“posechallenge”, fullPath, ByteArrayInputStream(byteArray), metadata)
try {
s3Client.putObject(putObjectRequest)
}catch (e: AmazonClientException){
Logger.error(TAG, e.stackTraceToString())
}catch (e: AmazonServiceException){
Logger.error(TAG, e.stackTraceToString())
}
}
finaly, I got a STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented Exception

I replace AWS S3 SDK with Minio Java SDK,it works。
In Minio SDK,it use UNSIGNED-PAYLOAD not the STREAMING-AWS4-HMAC-SHA256-PAYLOAD in AWS SDK。

1 Like