Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  20] [ 1]  / answers: 1 / hits: 7517  / 9 Years ago, sat, november 7, 2015, 12:00:00

This is the solution: fix it by converting the MD5 hex to base64 instead of the string.



Example for JS (Node.js or similar, browserify, etc.



new Buffer(md5, 'hex').toString('base64')


I just spent few minutes to figure this out so I thought I could share it. :)


More From » node.js

 Answers
3

Content-MD5 is always a base64 header.




The base64-encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the data is the same data that was originally sent. Although it is optional, we recommend using the Content-MD5 mechanism as an end-to-end integrity check. For more information about REST request authentication, go to REST Authentication in the Amazon Simple Storage Service Developer Guide

Type: String

Default: None

Constraints: None


REST Put Object


[#33033] Thursday, November 5, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lamarmaximiliand

Total Points: 388
Total Questions: 104
Total Answers: 104

Location: Oman
Member since Fri, Dec 23, 2022
1 Year ago
;