-
Notifications
You must be signed in to change notification settings - Fork 62
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
Added support for CloudflareR2 Storage adaptar #97
Conversation
@stnguyen90 @gewenyu99 kindly review |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any documentation on the host?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Do you mean the linting tests? I have attached a screenshot for the same in the pr description |
@stnguyen90 any updates ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Co-authored-by: Steven Nguyen <1477010+stnguyen90@users.noreply.github.com>
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 |
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! |
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 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consolidate
I wasn't , i just followed the guide for adding a new adapter |
Any update? |
Closing as this doesn't actually work. |
fixes appwrite/appwrite#3352
Screenshots :