POST管理接口
完成上传
合并全部分片、计算 SHA-256 并登记文件。写入本机存储时同步完成,返回 `status=ready`; 写入 WebDAV 时返回 `status=pending`,由后台转存,完成后变为 `ready`(失败为 `failed`)。 分片不全返回 409。
URL
/api/v1/admin/projects/{projectKey}/files/uploads/{uploadId}/complete鉴权方式
需要管理员 JWT(Authorization: Bearer <token>)
请求参数
Path 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| projectKey | string | 是 | 项目主键 project_key(大小写不敏感) |
| uploadId | string | 是 | 上传会话 id |
Header 参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer <管理员 JWT 或 API Key> |
该接口无需请求体。
响应示例
200 响应
{
"id": "k3v9q2m7x1ab",
"project_key": "verhub",
"filename": "Verhub-Setup-1.2.0.msi",
"size": 52428800,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"part_size": null,
"content_type": "application/x-msi",
"status": "ready",
"source": "upload",
"source_url": null,
"error": null,
"storage_backend_id": "local",
"storage_backend_name": "本机存储",
"path": "/f/verhub/k3v9q2m7x1ab/Verhub-Setup-1.2.0.msi",
"url": "https://cdn.verhub.example.com/f/verhub/k3v9q2m7x1ab/Verhub-Setup-1.2.0.msi",
"referenced_by": [
"1.2.0"
],
"created_at": 1760000000,
"updated_at": 1760000000
}POST
