Uh oh!
There was an error while loading. Please reload this page.
Added support for CloudflareR2 Storage adaptar - #97
Conversation
@stnguyen90@gewenyu99 kindly review |
bannu0snake
commented
Oct 20, 2023
hi @Tushar98644 , can you please let me know how did you setup php and testing env in your mac. any reference links ? |
I just installed |
stnguyen90
left a comment
There was a problem hiding this comment.
Great PR! 🤯 We left some comments during the review, please check them out.
Please also make sure to run the test locally and attach a screenshot of the result.
Uh oh!
There was an error while loading. Please reload this page.
| public function __construct(string $root, string $accessKey, string $secretKey, string $bucket, string $region = self::APAC, string $acl = self::ACL_PRIVATE) | ||
| { | ||
| parent::__construct($root, $accessKey, $secretKey, $bucket, $region, $acl); | ||
| $this->headers['host'] = $bucket.'.'.'s3'.'.'.$region.'.cloudflarestorage.com'; |
There was a problem hiding this comment.
Do you have any documentation on the host?
There was a problem hiding this comment.
An S3 API URL looks like this:
https://accountid.r2.cloudflarestorage.com/bucketname
Where account id is your CF Account ID, like this:
https://905fa3fe223dcff4bf6b46911342bcfd.r2.cloudflarestorage.com/test
If you are using the EU Juristiction, you need to add .eu before the .r2, like this:
https://905fa3fe223dcff4bf6b46911342bcfd.eu.r2.cloudflarestorage.com/test
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tushar98644
commented
Oct 25, 2023
Do you mean the linting tests? I have attached a screenshot for the same in the pr description |
Tushar98644
commented
Oct 28, 2023
@stnguyen90 any updates ? |
stnguyen90
left a comment
There was a problem hiding this comment.
Some minor changes.
Please also address https://github.com/utopia-php/storage/pull/97/files#r1370466673
Do you mean the linting tests? I have attached a screenshot for the same in the pr description
No, I mean actual tests. Something that confirms this code actually works with Cloudflare R2 storage.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
Tushar98644
commented
Oct 31, 2023
![]() I am having some issues with the card details and adding the r2 storage subscription to my account , would really appreciate it if you could test it from your side |
gewenyu99
commented
Oct 31, 2023
Hey, Due to time constraints, I'm going to mark this PR When it is merged, we'll contact you for Appwrite-specific Hacktoberfest swag. Thanks for helping us improve Appwrite! |
stnguyen90
commented
Oct 31, 2023
How were you validating anything if you didn't have access to Cloudflare R2 storage? |
| /** | ||
| * Regions constants | ||
| * Reference: https://developers.cloudflare.com/durable-objects/platform/data-location/ | ||
| */ | ||
| /** | ||
| * Regions constants | ||
| */ |
Tushar98644
commented
Nov 4, 2023
I wasn't , i just followed the guide for adding a new adapter |
docimin
commented
Nov 14, 2023
Any update? |
stnguyen90
commented
Apr 2, 2024
Closing as this doesn't actually work. |

fixesappwrite/appwrite#3352
Screenshots :