add cloudflare r2

This commit is contained in:
fyears 2024-01-03 00:08:51 +08:00
parent ee8a3df0be
commit af71758ef7
5 changed files with 37 additions and 0 deletions

View File

@ -61,6 +61,7 @@ Additionally, the plugin author may occasionally visit Obsidian official forum a
### S3
- Tutorials / Examples:
- [Cloudflare R2](./docs/remote_services/s3_cloudflare_r2/README.md)
- [MinIO](./docs/remote_services/s3_minio/README.md)
- Prepare your S3 (-compatible) service information: [endpoint, region](https://docs.aws.amazon.com/general/latest/gr/s3.html), [access key id, secret access key](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-your-credentials.html), bucket name. The bucket should be empty and solely for syncing a vault.
- About CORS:

View File

@ -0,0 +1,27 @@
# Cloudflare R2
## Links
<https://www.cloudflare.com/developer-platform/r2/>
## Steps
1. **Be aware that it may cost you money.**
2. Create a Cloudflare account and enable R2 feature. **Credit card info might be required by Cloudflare**, though Cloudflare provides generous free tier and zero egress fee.
3. Create a bucket.
![](./s3_cloudflare_r2_create_bucket.png)
4. Create an Access Key with "Object Read & Write" permission, and add specify to your created bucket. During the creation, you will also get the auto-generated secret key, and the endpoint address.
![](./s3_cloudflare_r2_create_api_token.png)
5. In remotely-save setting page, input the address / bucket / access key / secret key. **Region being set to `us-east-1` is sufficient.** Enable "Bypass CORS", because usually that's what you want.
Click "check connectivity". (If you encounter an issue and sure the info are correct, please upgrade remotely-save to **version >= 0.3.29** and try again.)
![](./s3_cloudflare_r2_rs_settings.png)
6. Sync!
## And Issue Related To "Check Connectivity"
If you encounter an issue and sure the info are correct, please upgrade remotely-save to **version >= 0.3.29** and try again.
Cloudflare doesn't allow `HeadBucket` for access keys with "Object Read & Write". So it may be possible that checking connectivity is not ok but actual syncing is ok. New version >= 0.3.29 of the plugin fix this problem by using `ListObjects` instead of `HeadBucket`.

Binary file not shown.

Binary file not shown.

Binary file not shown.