From df29e13c26b2681f18c5c801bbc3c28cb297c7b7 Mon Sep 17 00:00:00 2001 From: panda <1415243231@qq.com> Date: Mon, 25 May 2026 23:42:01 +0800 Subject: [PATCH] docs: clarify coverImage URL format and static asset paths --- API.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/API.md b/API.md index fcb993f..0923cf0 100644 --- a/API.md +++ b/API.md @@ -19,13 +19,15 @@ "name": "我的项目", "description": "项目描述", "createdAt": "2026-05-25T10:00:00", - "coverImage": "https://...", // nullable + "coverImage": "/uploads/covers/1/abc123.jpg", // 相对路径,访问时需加域名 "reportCount": 3, "todayNewReports": 1 } ] ``` +> `coverImage` 字段为相对路径,完整访问地址为 `https://www.1415243231.top/uploads/covers/1/abc123.jpg` + --- ### GET /projects/{id} @@ -173,6 +175,16 @@ Content-Disposition: attachment; filename="filename.html" --- +## 静态资源路径说明 + +`coverImage` 字段为后端存储的相对路径,需拼接完整 URL 才能在浏览器中访问: + +| 字段 | 相对路径示例 | 完整访问地址 | +|------|------------|------------| +| coverImage | `/uploads/covers/1/abc.jpg` | `https://www.1415243231.top/uploads/covers/1/abc.jpg` | + +--- + ## 错误响应格式 所有错误返回 `500 Internal Server Error`,响应体: