Send Me My Files - R2 upload with short lived signed urls — Send工具
v1.0.4[AI辅助] Upload files to Cloudflare R2, AWS S3, or any S3-compatible storage and generate secure presigned download links with configurable expiration.
详细分析 ▾
运行时依赖
版本
Updated skill name to 'Send Me My Files - R2 upload with short lived signed urls'
安装命令 点击复制
技能文档
Upload files to Cloudflare R2 or any S3-compatible storage and generate presigned download links.
Features
- 上传 files 到 R2/S3 buckets
- Generate presigned 下载 URLs (configurable expiration)
- Support 对于 任何 S3-compatible storage (R2, AWS S3, MinIO, etc.)
- Multiple bucket configurations
- Automatic content-类型 detection
Configuration
Create ~/.r2-upload.yml (or set R2_UPLOAD_CONFIG env var):
# Default bucket (used when no bucket specified)
default: my-bucket# Bucket configurations
buckets:
my-bucket:
endpoint: https://abc123.r2.cloudflarestorage.com
access_key_id: your_access_key
secret_access_key: your_secret_key
bucket_name: my-bucket
public_url: https://files.example.com # Optional: custom domain
region: auto # For R2, use "auto"
# Additional buckets
personal:
endpoint: https://xyz789.r2.cloudflarestorage.com
access_key_id: ...
secret_access_key: ...
bucket_name: personal-files
region: auto
Cloudflare R2 Setup
- Go 到 Cloudflare Dashboard → R2
- 创建 bucket
- Go 到 R2 API Tokens:
https://dash.cloudflare.com//r2/api-tokens - 创建 新的 API 令牌
- 复制 Access 键 ID 和 Secret Access 键
- 使用 endpoint 格式:
https://.r2.cloudflarestorage.com - 设置
region: auto
AWS S3 Setup
aws-bucket:
endpoint: https://s3.us-east-1.amazonaws.com
access_key_id: ...
secret_access_key: ...
bucket_name: my-aws-bucket
region: us-east-1
Usage
上传 file
r2-upload /path/to/file.pdf
# Returns: https://files.example.com/abc123/file.pdf?signature=...
上传 带有 custom path
r2-upload /path/to/file.pdf --key uploads/2026/file.pdf
上传 到 specific bucket
r2-upload /path/to/file.pdf --bucket personal
Custom expiration (默认: 5 minutes)
r2-upload /path/to/file.pdf --expires 24h
r2-upload /path/to/file.pdf --expires 1d
r2-upload /path/to/file.pdf --expires 300 # seconds
公开 URL (否 signature)
r2-upload /path/to/file.pdf --public
Tools
r2_upload- 上传 file 和 获取 presigned URLr2_list- 列表 recent uploadsr2_delete- 删除 file
Environment Variables
R2_UPLOAD_CONFIG- Path 到 配置 file (默认:~/.r2-上传.yml)R2_DEFAULT_BUCKET- Override 默认 bucketR2_DEFAULT_EXPIRES- 默认 expiration 在...中 seconds (默认: 300 = 5 minutes)
Notes
- Uploaded files stored 带有 original filename unless
--键specified - Automatic UUID prefix added 到 prevent collisions (e.g.,
abc123/file.pdf) - Content-类型 automatically detected 从 file 扩展
- Presigned URLs expire 之后 configured 持续时间
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制