TIL: How to fix Cloudflare R2 Checksum with ActiveStorage
Feb 2, 2025
Beginning with aws-sdk-s3
Amazon changed something with calculating checksums. Unfortunately the change is not compatible with Cloudflare R2.
Luckily this is easily fixed by changing your config/storage.yml
configuration and adding the following two options
cloudflare:
service: s3
...
request_checksum_calculation: when_required
response_checksum_validation: when_required