fix: delete bug

This commit is contained in:
tao.chen
2026-08-14 20:37:25 +08:00
parent 1079b62f0a
commit f72dfd10e8
3 changed files with 262 additions and 60 deletions
+4
View File
@@ -484,10 +484,14 @@ queued ──→ running ──┬─→ succeeded
|---|---|---|
| `POST` | `/api/v1/data-resources/uploads` | 创建上传会话,返回 `upload_id` + `upload_path` |
| `PUT` | `/api/v1/data-resources/uploads/{upload_id}` | 上传字节(请求体即文件内容) |
| `POST` | `/api/v1/data-resources/uploads/{upload_id}/bind` | 绑定已完成上传为数据资源 |
| `GET` | `/api/v1/data-resources` | 列表(workspace 范围) |
| `GET` | `/api/v1/data-resources/{id}` | 详情 |
| `POST` | `/api/v1/data-resources/{id}/download-url` | 生成 presigned GET URL |
| `DELETE` | `/api/v1/data-resources/{id}` | 软删 |
**同名冲突**:同一 `workspace` 内、同一目录(`target_path` 相等)、同一 `owner` 下,`resource_name` 重复提交绑定返回 `409`。不同目录或不同 `owner` 允许重名。重新绑定同一 `upload_id`(`storage_object_id` 已落库)走 idempotent 复用路径,不视为冲突。
字节归档到 trash bucket(`settings.s3_trash_bucket`)。
请求示例(上传):`POST /api/v1/data-resources/uploads`