分片上传文件(上传分片)
POST
/open-apis/drive/v1/files/upload_part
自建应用商店应用
该接口不支持太高的并发,且调用频率上限为5QPS
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
200 | 1061001 | internal error. | 服务内部错误,包括超时,错误码没处理。 |
400 | 1061002 | params error. | 请检查请求参数是否正确。 |
400 | 1061021 | upload id expire. | 上传事务过期,请重头开始上传。 |
403 | 1061073 | no scope auth. | 没有申请接口权限。 |
400 | 1062007 | upload user not match. | 请确保当前请求身份和上传任务的身份为同一个。 |
400 | 1062008 | checksum param Invalid. | 请确保文件/文件块的checksum正确。 |
400 | 1062009 | the actual size is inconsistent with the parameter declaration size. | 实际传输的文件大小和参数说明的大小不符合一致。 |
400 | 1062010 | block missing, please upload all blocks. | 部分文件分片缺失,请确保所有文件分片上传完成。 |
400 | 1062011 | block num out of bounds. | 上传过多文件分片,请确保上传的为对应文件。 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/drive/v1/files/upload_part' \
--header 'Authorization;'
响应示例响应示例
{
"code": 0,
"msg": "success",
"data": {}
}
请求参数
Header 参数
Content-Type
string
可选
示例值:
multipart/form-data; boundary=---7MA4YWxkTrZu0gW
Authorization
string
必需
默认值:
Bearer {{access_token}}
Body 参数multipart/form-data
upload_id
可选
示例值:
123456
seq
可选
示例值:
0
size
可选
示例值:
4194304
checksum
可选
示例值:
12342388237783294798
file
file
可选
返回响应
修改于 2023-01-13 06:18:04