Cloudflare R2 配合 PicGo 博客图床
R2 vs S3#
Cloudflare R2 vs AWS S3 | Review Pricing & Features | Cloudflare
Install mc (MinIO Client)#
# just install minio client not minio server
brew install minio/stable/mc
mc alias set r2 R2-URL AccessKey SecretKey
The MinIO client provides identical commands to Unix file management commands, such as cp and ls, but is designed for both local and remote storage systems. It’s fully compatible with AWS S3.
Common Commands#
mc ls <ALIAS>/<BucketName>: List all objects in a bucket.
mc cp -r <LOCAL-FOLDER-PATH> <ALIAS>/<BUCKET>/<REMOTE-FOLDER-PATH>: Upload a folder to a bucket.
mc rm <ALIAS>/<BUCKET>/<OBJECT>: Remove an object.
PicGo with R2#
macOS系统安装完PicGo显示文件已损坏, 因为 PicGo 没有签名,所以会被 macOS 的安全检查所拦下
sudo spctl –master-disable
xattr -cr /Applications/PicGo.app
You need install a S3 plugin to use R2 as a storage service.
Here is how to configure S3:
-
MacOS cannot open the app because it is from an unidentified developer, check the solution
Presigned URL#
Presigned URLs can only be used with the
<accountid>.r2.cloudflarestorage.com
S3 API domain and cannot be used with custom domains. https://arc.net/l/quote/wbihytnh
查看其他文章