TIL: How to fix Cloudflare R2 Checksum with ActiveStorage

--

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

--

--

Henrik Hauge Bjørnskov
Henrik Hauge Bjørnskov

Written by Henrik Hauge Bjørnskov

I build stuff at Relatel A/S, vivid traveller and gear junkie.

No responses yet