#payloadcms/storage-s3: ERROR: Header 'x-amz-checksum-crc32' with value "" not implemented
18 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
Copied from the thread in general chat
I am using Cloudflare R2 for S3 compatible bucket storage for images
https://developers.cloudflare.com/r2/api/s3/api/ and search "x-amz-checksum-algorithm"
R2 implements the S3 API to allow users and their applications to migrate with ease. When comparing to AWS S3, Cloudflare has removed some API operations' features and added others. The S3 API operations are listed below with their current implementation status. Feature implementation is currently in progress. Refer back to this page for updates...
You can see they have no implemented a lot, if any, of the checksum "stuff"
So it looks like R2 is a poor choice on compatibility? And the answer is to find a different service.
Even though this was working in the past.
Actually thank you to @floral schooner for this: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-js-v3/
Client version 3.729.0 introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
To mitigate, users can use 3.726.1 or add the following to their S3Client config:
requestChecksumCalculation: "WHEN_REQUIRED",
responseChecksumValidation: "WHEN_REQUIRED",```
Nice, they gave a proper version to revert to
s3Storage({
collections: {
media: true,
},
bucket: process.env.S3_BUCKET,
config: {
endpoint: process.env.S3_ENDPOINT,
credentials: {
accessKeyId: process.env.S3_ACCESS_KEY_ID,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,
},
region: process.env.S3_REGION,
// ... Other S3 configuration
requestChecksumCalculation: "WHEN_REQUIRED",
responseChecksumValidation: "WHEN_REQUIRED",
},
}),
],```
Confirmed working and fixed
Glad your issue was resolved! :tada: If you want to help make payload better, please give us a :star: on GitHub and review us - It helps us a lot.
Sensational, my friend, I'm relieved
Well thank you for finding that.
I am relieved as well. I did not want to spend today finding and implementing a new cloud storage plugin
Trust me, I was sweating as well