文件
上传文件
POST
/open-api/v1/files/upload
Headers:
Header | Parameters | 说明 |
---|---|---|
x-qbit-access-token | string | access token |
Content-Type | multipart/form-data | form-data 类型 |
POST 请求参数:
字段 | 类型 | 是否为必填 | 说明 |
---|---|---|---|
files | 文件 | 是 | 文件 |
返回参数:
字段 | 类型 | 说明 |
---|---|---|
data | string[] | 附件 ID 数组(按传入顺序) |
请求示例:
curl --location --request POST 'https://global.service.staging.qbitnetwork.com/open-api/v1/files/upload' \
--header 'x-qbit-access-token: 971084dc7b26f1b327142829c8a1ab3dd26dd3b4' \
--form 'files=@"/D:/Download/Chrome/face.mp4"'
1
2
3
2
3
下载文件
POST
/open-api/v1/files/download
Headers:
Header | Parameters | 说明 |
---|---|---|
x-qbit-access-token | string | access token |
Content-Type | application/json | json 类型 |
POST 请求参数:
字段 | 类型 | 是否为必填 | 说明 |
---|---|---|---|
attachmentId | string | 是 | 文件 ID |
返回参数:
文件流
请求示例:
curl --location --request POST 'https://global.service.staging.qbitnetwork.com/open-api/v1/files/download' \
--header 'x-qbit-access-token: 971084dc7b26f1b327142829c8a1ab3dd26dd3b4' \
--data-raw '{
"attachmentId":"b26baa7b-3ede-4a43-92e2-a54eb2552581"
}'
1
2
3
4
5
2
3
4
5