mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-05 22:31:32 +08:00
feat: add s3 attachment (#291)
This commit is contained in:
34
vitepress-docs/docs/zh/guide/feature/s3-attachment.md
Normal file
34
vitepress-docs/docs/zh/guide/feature/s3-attachment.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# 配置 S3 附件
|
||||
|
||||
## 配置
|
||||
|
||||
> [!NOTE]
|
||||
> 如果不需要 S3 附件, 可跳过此步骤
|
||||
|
||||
在 Cloudflare 创建一个 R2 bucket, 你也可以使用其他的 S3 服务(如有 bug 请提 issue)
|
||||
|
||||
参考: [配置 Cloudflare R2 的 cors](https://developers.cloudflare.com/r2/buckets/cors/#add-cors-policies-from-the-dashboard)
|
||||
|
||||
参考 [Cloudflare R2 s3 toke](https://developers.cloudflare.com/r2/api/s3/tokens/) 创建 token, 拿到 `ENDPOINT`, `Access Key ID` 和 `Secret Access Key`,然后执行下面的命令添加到 secrets 中
|
||||
|
||||
> [!NOTE]
|
||||
> 你也可以在 Cloudflare worker 的 UI 界面中添加 `secrets`
|
||||
|
||||
```bash
|
||||
cd worker
|
||||
pnpm wrangler secret put S3_ENDPOINT
|
||||
pnpm wrangler secret put S3_ACCESS_KEY_ID
|
||||
pnpm wrangler secret put S3_SECRET_ACCESS_KEY
|
||||
# 请注意这里的 bucket 是你的 bucket 名称
|
||||
pnpm wrangler secret put S3_BUCKET
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
保存附件
|
||||
|
||||

|
||||
|
||||
下载附件
|
||||
|
||||

|
||||
@@ -1,5 +1,18 @@
|
||||
# 配置 Telegram Bot
|
||||
|
||||
## Telegram Bot 配置
|
||||
|
||||
> [!NOTE]
|
||||
> 如果不需要 Telegram Bot, 可跳过此步骤
|
||||
|
||||
请先创建一个 Telegram Bot,然后获取 `token`,然后执行下面的命令,将 `token` 添加到 secrets 中
|
||||
|
||||
你也可以在 Cloudflare 的 UI 界面中添加 `secrets`
|
||||
|
||||
```bash
|
||||
pnpm wrangler secret put TELEGRAM_BOT_TOKEN
|
||||
```
|
||||
|
||||
## Bot
|
||||
|
||||
- 可设置白名单用户
|
||||
|
||||
Reference in New Issue
Block a user