Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix TencentCOS CDN endpoint failing on bucket check

Mozi082031cc85d4
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 6c799ec18..5bfc118a9 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -1861,6 +1861,10 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if opt.Provider == "Rabata" {
f.features.Copy = nil
}
+ if opt.Provider == "TencentCOS" && strings.Contains(opt.Endpoint, "cos.accelerate.myqcloud.com") {
+ // Global Acceleration endpoint does not support bucket creation.
+ f.opt.NoCheckBucket = true
+ }
if opt.DirectoryMarkers {
f.features.CanHaveEmptyDirectories = true
}
diff --git a/docs/content/s3.md b/docs/content/s3.md
index 2ca9a8d8c..369f8866f 100644
--- a/docs/content/s3.md
+++ b/docs/content/s3.md
@@ -9119,6 +9119,16 @@ To configure access to Tencent COS, follow the steps below:
==== ====
cos s3
```
+
+#### Tencent COS Global Acceleration Endpoint
+
+When using the Global Acceleration Endpoint (`cos.accelerate.myqcloud.com`),
+rclone automatically sets `no_check_bucket = true` because this acceleration
+endpoint does not support the `CreateBucket` call which is used for ensuring
+a bucket's existence by rclone. Global Acceleration is a per-bucket feature,
+so you should first create the bucket in one physical region, then enable it
+in the Tencent Cloud console.
+
### US3 {#us3}
[US3](https://www.ucloud.cn/site/product/ufile.html) Object Storage is a service that provides cloud storage for unstructured files for internet applications.