AnsweredAssumed Answered

How to calculate hashed payload

Question asked by pokoraalex on Jan 8, 2019
Latest reply on Jan 27, 2019 by fmpdude

Hello everyone!



I’m trying to send a PDF file from a container to amazon s3 using “Insert From URL” script step. To send successfully, I must calculate hashed payload. But all my attempts give me





<Message>x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD, or a valid sha256 value.</Message>






I calculate hashed payload as follows:



Set Variable $data = Table :: container.



Set Variable $XAmzContentSha256 = Lower (HexEncode (CryptDigest ($ data; “SHA256"))).



In my cURL options:



“-X POST” &



“-H \” Host: “& $host &” \“” &



“-H \” Content-Type: “& $ContentType &” \“” &



“-H \” Authorization: “& $AuthorizationString &” \“” &



“-H \” x-amz-date: “& $XAmzDate &” \“” &



“-H \” x-amz-content-sha256: “& $XAmzContentSha256 &” \“” &



“--data @$data”



However, I do not succeed. I would be very grateful if someone more experienced would help me with advice. Please, tell me what I’m doing wrong!