#payloadcms/storage-s3: ERROR: Header 'x-amz-checksum-crc32' with value "" not implemented

18 messages · Page 1 of 1 (latest)

plush dust
#

I removed the value because I have no idea if that is a security issue or not. I updated to 3.17.1, and now Cloudflare R2 storage is no longer working. This was "just working" and I am not sure how I messed anything up. My ask is: is anyone else seeing this error?

candid tendonBOT
plush dust
#

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"

Cloudflare Docs

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.

#

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",```
floral schooner
#

Nice, they gave a proper version to revert to

plush dust
#
    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

candid tendonBOT
floral schooner
#

Sensational, my friend, I'm relieved

plush dust
#

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

floral schooner
#

Trust me, I was sweating as well