Hi,
I wish to use ContentMD5 to insure integrity check for putObject and getObject.
But Spaces always response 400:InvalidDigest when ContentMD5 supplied.
The Spaces client I’m using is https://www.npmjs.com/package/aws-sdk
and following is the code for putting object
params =
Body: content
ContentMD5 : crypto.createHash('md5').update(content).digest("hex")
Bucket: S3_BUCKET_PARAMS,
ContentType : contentType || "application/json"
Key: remotePath
log "[putString] params:", params
S3Client.putObject params, (err, data) ->
if err?
log "[putJsonObject] ERROR:#{err}"
return callback(err)
log "[putJsonObject] data:", data
return callback null, data
return
and following is the log
-->
[putString] params: { Body: '{"haha":"nothing"}',
ContentMD5: 'e829496f87c60b176b2f288020648348',
Bucket: 'aaa-bbb',
ContentType: 'application/json',
Key: '11111/2019/11/09' } +0ms
<--
err: { InvalidDigest: null
message: null,
code: 'InvalidDigest',
region: null,
time: 2019-08-02T07:29:39.644Z,
requestId: 'tx0000000000001e2c28c77-005d43e662-284cc8-sgp1a',
extendedRequestId: undefined,
cfId: undefined,
statusCode: 400,
retryable: false,
retryDelay: 96.90178409690691 }
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey there,
Without full request and response headers, it is difficult for us to say if this is an issue on the client end or the backend with Spaces. Could you write in a ticket to our team:
With those details so we can investigate? Alternatively, you can write those details in here with redacted secrets and we can look to help.
Regards, Ethan Fox Developer Support Engineer II - DigitalOcean
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.