视频上传
https://chat-go.jwzhd.com/open-apis/v1/video/upload?token=xxxxxxxxxx
POST
curl --location 'https://chat-go.jwzhd.com/open-apis/v1/video/upload?token=xxxxxxxxxx' \--form 'video=@"D:\\video\\aaa\\bbb.mp4"'Content-Type: "multipart/form-data;"| 字段 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| video | file | 是 | 视频内容,仅限单个视频,上传视频大小不超过 20MB |
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 响应代码 |
| msg | string | 响应信息,包括异常信息 |
| data | Object | 返回数据 |
图片上传响应示例
Section titled “图片上传响应示例”{ "code": 1, "data": { "videoKey": "xxxxxxxxxxxx" }, "msg": "success"}Python 代码示例
Section titled “Python 代码示例”import requests
url = "https://chat-go.jwzhd.com/open-apis/v1/video/upload?token=xxxxxx"
files=[ ('video',open('6bca4389875743205502a57bb90fcad0.mp4','rb'))]
response = requests.request("POST", url, files=files)print(response.text)