PutObjectResult contentMd5 equivalent in version 2? #3313
-
Hi I was using amazon java sdk v1 to upload files to S3. On successfully uploading, the PutObjectResult class returned a content md5 hash. We do not calculate the hash explicitly before uploading the file to S3, it did return a md5. I don't see the same in version 2 for PutObjectResponse. Is there any support of the same? I have searched documentations, but I have not got any answers. I'm using the version 2.17.196. Let me know if any further information is required |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
HI @ghoshrahul apologies for losing track of this. The Java SDK v2 S3 Client does not calculate the Content-MD5 by default anymore. It only calculates it when it's required by the API, like DeleteObject. We do have a feature request to automatically add Content-MD5 in PutObject in the specific case when the bucket retention policy is enabled - #2155. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
HI @ghoshrahul apologies for losing track of this.
The Java SDK v2 S3 Client does not calculate the Content-MD5 by default anymore. It only calculates it when it's required by the API, like DeleteObject.
We do have a feature request to automatically add Content-MD5 in PutObject in the specific case when the bucket retention policy is enabled - #2155.