feat: 添加媒体资产上传初始化和完成相关API接口及数据结构
This commit is contained in:
@@ -119,6 +119,31 @@ Authorization: Bearer {{ token }}
|
||||
"discount_value": 0
|
||||
}
|
||||
|
||||
### Tenant Admin - MediaAsset upload init (create asset + upload params)
|
||||
POST {{ host }}/t/{{ tenantCode }}/v1/admin/media_assets/upload_init
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{ token }}
|
||||
|
||||
{
|
||||
"type": "video",
|
||||
"content_type": "video/mp4",
|
||||
"file_size": 12345678,
|
||||
"sha256": ""
|
||||
}
|
||||
|
||||
### Tenant Admin - MediaAsset upload complete (uploaded -> processing)
|
||||
@assetID = 1
|
||||
POST {{ host }}/t/{{ tenantCode }}/v1/admin/media_assets/{{ assetID }}/upload_complete
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{ token }}
|
||||
|
||||
{
|
||||
"etag": "",
|
||||
"content_type": "video/mp4",
|
||||
"file_size": 12345678,
|
||||
"sha256": ""
|
||||
}
|
||||
|
||||
### Tenant Admin - Attach asset to content (main/cover/preview)
|
||||
@assetID = 1
|
||||
POST {{ host }}/t/{{ tenantCode }}/v1/admin/contents/{{ contentID }}/assets
|
||||
|
||||
Reference in New Issue
Block a user