jrrdnx / craft-cloudflare-r2

MIT License
6 stars 3 forks source link

Secure Downloads #8

Closed hheckel closed 6 months ago

hheckel commented 9 months ago

Can you make it work with https://github.com/kennethormandy/craft-s3securedownloads/? Thanks.

jrrdnx commented 9 months ago

Have you tried this yet?

R2 implements the S3 API so this should theoretically already work. Looking at that plugin's source code it already seems to match R2's docs on how to generate presigned urls.

https://developers.cloudflare.com/r2/api/s3/presigned-urls https://developers.cloudflare.com/r2/examples/aws/aws-sdk-php/#generate-presigned-urls