上传资源(视频/音频)
POST /openapi/v2/media/upload
说明
- 支持以下mime/type & 后缀 "video/mp4": "mp4", "video/mov": "mov", "video/webm": "webm", "video/quicktime": "mov" "audio/mpeg": "mp3", "audio/wav": "wav", "audio/vnd.wave": "wav", "audio/x-wav": "wav", "audio/x-m4a": "m4a", "audio/aac": "aac", "audio/x-aac": "aac", "audio/wave": "wav", "audio/mp4": "mp3"
- 视频文件限制 最大分辨率:1920 最大文件大小:50MB 最大时长:30秒
- 音频文件限制 最大文件大小:50MB 最大时长:30秒
概览
| Method | POST |
|---|---|
| Path | /openapi/v2/media/upload |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 86260306 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "OKDOawqrxb", "enable": true, "name": "API-KEY", "sampleValue": "{{YOUR_API_KEY}}" } ] }
请求体
{ "type": "multipart/form-data", "parameters": [ { "required": false, "description": "file or file_url 二选一", "type": "file", "id": "1irmGogpQE", "enable": true, "name": "file", "schema": { "format": "binary", "type": "string" }, "sampleValue": "" }, { "required": false, "description": "可以使用url 上传资源. 支持以下mime-type/ 后缀\n\"video/mp4\": \"mp4\", \"video/mov\": \"mov\", \"video/webm\": \"webm\", \"video/quicktime\": \"mov\"\n\"audio/mpeg\": \"mp3\", \"audio/wav\": \"wav\", \"audio/vnd.wave\": \"wav\", \"audio/x-wav\": \"wav\", \"audio/x-m4a\": \"m4a\", \"audio/aac\": \"aac\", \"audio/x-aac\": \"aac\", \"audio/wave\": \"wav\", \"audio/mp4\": \"mp3\"\n", "type": "string", "id": "KlAV3WZ5sm", "enable": true, "name": "file_url", "sampleValue": "" } ], "required": true, "mediaType": "", "examples": [], "oasExtensions": "" }
响应
[ { "id": 196774800, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]