-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Cloudflare R2 #576
Comments
I haven't looked at the code, but I guess all that is needed is to change the API URLs + credentials? |
Adding some insight into this. So far this plugin is working well with R2. The only trouble I had was that the default ACL set on upload was not accepted by R2. Looking closer in the R2 docs it is clear that setting ACL on upload is not supported. However setting the value to private will make it work. Following the plugin docs, this is pretty straight-forward:
Also remember to set the custom endpoint pointing to R2 instead of AWS and tell the client use path style endpoint. Do this in the s3_uploads_s3_client_params filter according to the plugin docs. I defined the endpoint in a constant.
Providing a full example of defined constants. For some context check out an example from CF on how to utilize the aws-sdk for PHP:
|
dude you're a legend |
As we don't use Cloudflare R2, we don't plan to add any specific support for this to S3 Uploads per our support policy. We would accept documentation PRs (e.g. to the "Custom Endpoints" section of the readme) so long as it's clear we're not officially supporting Cloudflare. I'm glad you were able to get this to work in the meantime! |
Thank you very much, it is still working! |
I'm unclear where this goes.
I understand the define statments go in wp-config.php, but do the function and filter statements go in here, or in wordpress theme functions.php or somewhere in the plugins/s3-uploads directory. OK, having read through the documentation with fresh eyes, I now see that I need to create a file: |
@rmccue - What a pity to decide to not support R2 which is couple additions of code and much better compared to AWS S3 in terms of costs and performance. But anyway this is free software and i respect your decision. |
Hello,
Since Cloudflare is S3 compatible, can someone share some directions for implementation of S3-Uploads with Cloudflare R2?
The text was updated successfully, but these errors were encountered: