通过 POST http://127.0.0.1:3000/upload_file_stream(请求体为 JSON 参数)或 WebSocket 调用。
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
stream_id |
string | ✓ | 流 ID(客户端生成的 UUID,限 [A-Za-z0-9_-]) | |
chunk_data |
string | – | 分块数据(Base64) | |
chunk_index |
int | – | 分块索引(从 0 开始) | |
total_chunks |
int | – | 总分块数(新流必填) | |
file_size |
int | – | 文件总大小(字节) | |
expected_sha256 |
string | – | 期望的整文件 SHA256(校验) | |
is_complete |
bool | – | 是否为最后一个分块/触发合并 | |
filename |
string | – | 文件名 | |
reset |
bool | – | 重置并丢弃该流 | |
verify_only |
bool | – | 仅查询当前流状态 | |
file_retention |
int | – | 300000 |
合并文件保留毫秒(0=不回收) |
流式帧:分块确认 type=stream、完成 type=response(含 file_path/file_size/sha256)
该动作返回标准 OneBot 信封;data 结构待补充。
支持 MCP 的客户端可直接发现并调用本动作,无需手写 HTTP。见 MCP 接入。