Software Development Kit (SDK) and API Discussions

S3Object results in MD5 checksum error

X540
482 Views

Model: A400

OS: ontap 9.10P2

 

Ontap S3 bucket create

 

The Content-MD5 you spectified was invalid.  =>  error

======================================================================

com.amazon:aws-java-sdk-core:1.11.822

com.amazon:aws-java-sdk-s3:1.11.822

 

private fun doWrite(bucket: String, path: String, data: ByteArray): SecureCephResource {

 

    val meta = ObjectMetadata().apply {

      contentLength = data.size.toLong()

      contentMD5 = Md5Utils.md5AsBase64(data)

    }

   

    PutObjectRequest(bucket, path, data.inputStream(), meta)

        .withAccessControlList(null)

        .withCannedAcl(CannedAccessControlList.PublicRead)

        .let { s3.putObject(it) }

}

======================================================================

 

Please guide me on these errors.

1 REPLY 1

Sungwoo
460 Views

The create bucket feature was introduced in ONTAP 9.11

Public