导入文档
... 2026-2-4 小于 1 分钟
# 导入文档
# 接口说明
将文件导入并解析为腾讯文档原生格式在线文档。 ** 支持的格式: doc、docx、xls、xlsx、txt、csv、ppt、pptx、xmind、pos、vsd、vsdx、html ** html导入为在线doc文档
# 请求格式
| 描述 | 定义 |
|---|---|
| Path | /openapi/drive/v3/files:import |
| Method | POST |
| Content-Type | multipart/form-data; boundary={calculated when request is sent}; charset=utf-8 |
# 请求头部
详见Headers。
# 请求参数
# 请求体
| 参数名 | 类型 | 必选 | 描述 |
|---|---|---|---|
| file | HTTP FORM File | 是 | 需要导入的源文件 |
| folderId | string | 否 | 目标文件夹,默认为根文件夹 |
# 请求示例
curl --location 'https://{domain}/openapi/drive/v3/files:import' \
--header 'Access-Token: ACCESS_TOKEN' \
--header 'Client-Id: CLIENT_ID' \
--form 'file=@"/Desktop/导入文档样例.doc"'
1
2
3
4
2
3
4
1
2
3
4
2
3
4
# 响应参数
# 响应体
# 响应示例
{
"taskId": "1022447688093794304_c85679cf-3b1e-da63-8182-64e8c5e51c65",
"type": "IMPORT"
}
1
2
3
4
2
3
4
1
2
3
4
2
3
4