服务端 API/云文档/云空间/素材/分片上传/分片上传素材（完成上传）
# 

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.larksuite.com/open-apis/drive/v1/medias/upload_finish
HTTP Method | POST
支持的应用类型 | Custom App、Store App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用**<br>开启任一权限即可 | 查看、评论、编辑和管理多维表格(bitable:app)<br>查看、评论、编辑和管理文档(docs:doc)<br>查看、评论、编辑和管理云空间中所有文件(drive:drive)<br>查看、评论、编辑和管理电子表格(sheets:spreadsheet)<br>更新视频会议特效素材(vc:material)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>或<br>`user_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：获取与使用access_token](https://open.larksuite.com/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM)
Content-Type | string | 是 | **固定值**："application/json; charset=utf-8"

### 请求体

名称 | 类型 | 必填 | 描述
---|---|---|---
upload_id | string | 是 | 分片上传事务ID<br>**示例值**：""
block_num | int | 是 | 分片数量<br>**示例值**：

### 请求体示例
```json
{
    "upload_id": "",
    "block_num": 
}
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
file_token | string | &nbsp;

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "file_token": ""
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
200 | 1061001 | unknown error. | &nbsp;
400 | 1061002 | params error. | &nbsp;
404 | 1061003 | not found. | &nbsp;
403 | 1061004 | forbidden. | &nbsp;
401 | 1061005 | auth failed. | &nbsp;
200 | 1061006 | internal time out, can retry. | &nbsp;
404 | 1061007 | file has been delete. | &nbsp;
400 | 1061008 | invalid file name. | &nbsp;
400 | 1061021 | upload id expire. | &nbsp;
400 | 1061041 | parent node has been deleted. | &nbsp;
400 | 1061042 | parent node out of limit. | &nbsp;
400 | 1061043 | file size beyond limit. | 请检查文件长度以避免超出限制。[具体限制请参考](https://www.larksuite.com/hc/zh-CN/articles/360049067549)
400 | 1061044 | parent node not exist. | &nbsp;
200 | 1061045 | can retry. | &nbsp;
400 | 1061109 | file name cqc not passed. | &nbsp;
400 | 1061113 | file cqc not passed. | &nbsp;
400 | 1061101 | file quota exceeded. | &nbsp;
202 | 1062004 | cover generating. | &nbsp;
202 | 1062005 | file type not support cover. | &nbsp;
202 | 1062006 | cover no exist. | &nbsp;
400 | 1062007 | upload user not match. | &nbsp;
400 | 1062008 | checksum param Invalid. | &nbsp;
400 | 1062009 | the actual size is inconsistent with the parameter declaration size. | &nbsp;
400 | 1062010 | block missing, please upload all blocks. | &nbsp;
400 | 1062011 | block num out of bounds. | &nbsp;
400 | 1061547 | attachment parent-child relation number exceed. | &nbsp;
400 | 1061061 | user quota exceeded. | &nbsp;
403 | 1061073 | no scope auth. | &nbsp;
400 | 1062012 | file copying. | &nbsp;
400 | 1062013 | file damaged. | &nbsp;
403 | 1062014 | dedupe no support. | &nbsp;
400 | 1062051 | client connect close. | &nbsp;
400 | 1062505 | parent node out of size. | &nbsp;
400 | 1062506 | parent node out of depth. | &nbsp;
400 | 1062507 | parent node out of sibling num. | &nbsp;

