From 813a5e09318207f20b2f2e64bedf3d352ca4902d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 17 May 2022 15:55:42 +0100 Subject: [PATCH] s3: Remove bucket ACL configuration for Cloudflare R2 Bucket ACLs are not supported by Cloudflare R2. All buckets are private and must be shared using a Cloudflare Worker. --- backend/s3/s3.go | 2 +- docs/content/s3.md | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 22fa90f67..2f72435ac 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -1294,7 +1294,7 @@ For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview Note that this ACL is applied when server-side copying objects as S3 doesn't copy the ACL from the source but rather writes a fresh one.`, - Provider: "!Storj", + Provider: "!Storj,Cloudflare", Examples: []fs.OptionExample{{ Value: "default", Help: "Owner gets Full_CONTROL.\nNo one else has access rights (default).", diff --git a/docs/content/s3.md b/docs/content/s3.md index 52d16225a..8c01c8c13 100644 --- a/docs/content/s3.md +++ b/docs/content/s3.md @@ -2575,6 +2575,10 @@ Here is an example of making a Cloudflare R2 configuration. First run: This will guide you through an interactive setup process. +Note that all buckets are private, and all are stored in the same +"auto" region. It is necessary to use Cloudflare workers to share the +content of a bucket publicly. + ``` No remotes found, make a new one? n) New remote @@ -2631,19 +2635,6 @@ Endpoint for S3 API. Required when using an S3 clone. Enter a value. Press Enter to leave empty. endpoint> https://ACCOUNT_ID.r2.cloudflarestorage.com -Option acl. -Canned ACL used when creating buckets and storing or copying objects. -This ACL is used for creating objects and if bucket_acl isn't set, for creating buckets too. -For more info visit https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl -Note that this ACL is applied when server-side copying objects as S3 -doesn't copy the ACL from the source but rather writes a fresh one. -Choose a number from below, or type in your own value. -Press Enter to leave empty. - / Owner gets FULL_CONTROL. - 1 | No one else has access rights (default). - \ (private) -... -acl> 1 Edit advanced config? y) Yes n) No (default)