图片存储 CDN

基于 API Key 上传、公开 URL 访问、定时自动清理的轻量图片存储服务。

服务状态 运行中

公开访问前缀/i/<YYYY-MM>/<文件名>
单文件上限10.00 MB
允许类型image/jpeg, image/png, image/gif, image/webp, image/avif, image/svg+xml
文件保留30 天
定时清理0 3 * * *
总量上限不限

上传图片

需要请求头 X-API-Key,表单字段名 file,使用 multipart/form-data

curl -X POST ${BASE}/api/upload \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@/path/to/image.png"

成功返回:

{
  "success": true,
  "url": "https://your-host/i/2026-07/xxxxxxxx.png",
  "size": 204800,
  "mimetype": "image/png"
}

其他接口

GET /health健康检查
GET /api/stats存储统计(需鉴权)
POST /api/cleanup手动触发清理(需鉴权)