S3 兼容图床
S3 兼容图床配置指南
Section titled “S3 兼容图床配置指南”PicFlow 支持所有兼容 S3 (Simple Storage Service) 协议的对象存储服务。这包括 AWS S3、MinIO、Cloudflare R2、阿里云 OSS、腾讯云 COS 等。
1. 准备工作
Section titled “1. 准备工作”在配置之前,你需要从你的云服务提供商处获取以下信息:
- Endpoint (端点): 服务的访问地址。
- Region (区域): 存储桶所在的区域代码。
- Bucket (存储桶): 存储桶名称。
- Access Key ID: 访问密钥 ID。
- Secret Access Key: 访问密钥 Secret。
2. 配置步骤
Section titled “2. 配置步骤”- 打开 Obsidian 设置,点击左侧 PicFlow。
- 找到 图床配置 区域,切换到 S3 Compatible。
- 填写相关信息:
- Endpoint: 填写完整的端点 URL(包括
https://)。- 例如 AWS:
https://s3.us-east-1.amazonaws.com - 例如 Cloudflare R2:
https://<ACCOUNT_ID>.r2.cloudflarestorage.com
- 例如 AWS:
- Region: 填写区域代码(如
us-east-1,auto)。 - Bucket: 填写你的存储桶名称。
- AccessKey: 填写你的 Access Key ID。
- SecretKey: 填写你的 Secret Access Key。
- Path Style Access: 如果你的服务强制要求 Path Style(如 MinIO),请开启此选项。
- Custom Domain: 如果你绑定了自定义域名(CDN),请在此处填写(如
https://img.example.com)。PicFlow 将使用此域名生成图片链接,而不是默认的 S3 链接。 - Upload Path: 设置上传目录(如
obsidian/images/),留空则上传到根目录。
3. 常见服务商配置示例
Section titled “3. 常见服务商配置示例”Cloudflare R2
Section titled “Cloudflare R2”- Endpoint:
https://<ACCOUNT_ID>.r2.cloudflarestorage.com - Region:
auto - Custom Domain: 强烈建议配置自定义域名(Public Domain),否则图片无法直接在浏览器预览。
MinIO (自建)
Section titled “MinIO (自建)”- Endpoint:
https://your-minio-server.com - Region:
us-east-1(或其他你设置的区域) - Path Style Access: 必须开启。
阿里云 OSS / 腾讯云 COS
Section titled “阿里云 OSS / 腾讯云 COS”虽然它们兼容 S3,但建议优先使用各自的 S3 兼容端点。
- 阿里云 OSS Endpoint:
https://oss-cn-hangzhou.aliyuncs.com(示例) - 腾讯云 COS Endpoint:
https://cos.ap-shanghai.myqcloud.com(示例)
4. 验证配置
Section titled “4. 验证配置”配置完成后,点击底部的 Test Connection 按钮。如果提示成功,即可开始使用。