# Function description
Get the accessKeyId
secretAccessKey
securityToken
of the uploaded cloud storage
# Request
# Request example
POST upload/sts/info HTTPS
Host: <host>
Content-Type: application/json
Authorization: <AuthString>
# Request Body
{
"type": 3,
"extension": "json",
"isNeedCallback": 1,
"uploadModule": "bs_project",
"projectId": 8357,
"isDir": 1,
"uuid": "",
"hideType": 1
}
# Request Parameters
Name | Description | Type | Mandatory |
---|---|---|---|
type | type - 0:qiniu - 1: qcloud - 2: aws - 3: aliyun - 4: baidu - 5: local - 6:huawei Currently only supports Alibaba Cloud, local | int | yes |
extension | The extension of the uploaded file | String | yes |
isNeedCallback | Fragment upload requires callback 0 no 1 yes Resource related to the current project does not require callback | int | yes |
uploadModule | Uploaded module bs project: bs_project app project: app_project video: resource_video image: resource_image audio: resource_audio template: material_template PR project: pr_project temporary directory: temp | String | yes |
platform | Uploaded device web side: web app side: app The default is app | String | no |
projectId | When the uploaded module is a bs project, you need to carry the project id | Long | no |
isDir | Whether it is a sequence book 0 no 1 yes | int | no |
uuid | the uuid of the template, this parameter is required when uploading the template | String | no |
hideType | The actual classification of the material, which is only required when uploading fragment animations | int | no |
# Request Headers
Name | Description | Type | Mandatory |
---|---|---|---|
Authorization | User token information | string | Yes |
# Request Body
none
# Response
# Response Header
No special response header
# Response Body
Successful Response Body :
{
"code": 0,
"message": "",
"data": {
"accessKeyId": ".....",
"secretAccessKey": ".....",
"securityToken": "....",
"bucket": "bseditor",
"endpoint": "http://oss-cn-beijing.aliyuncs.com",
"relativePath": "test/resource/video/2020/12/25/10503/0df00d20-5e55-4914-95f0-e02ff0abbfb8.mp4",
"callbackInfo": {
"callbackBodyType": "application/x-www-form-urlencoded",
"callbackUrl": "http://localhost:8088/upload/callback",
"customInfo": {
"objectId": 10503,
"resourceType": 1
},
"callbackBody": "objectId=${x:objectId}&resourceType=${x:resourceType}"
},
"expiration": "2020-12-26T01:05:02Z",
"region": "oss-cn-beijing",
"objectId": 10503,
"signature": "......",
"policy": "......"
}
}
Name | Description | Type | Mandatory |
---|---|---|---|
relativePath | The key for uploading files to cloud storage | int | yes |
callbackInfo | Information carried when calling back | object | no |
callbackBodyType | content-type when callback | String | no |
callbackUrl | callback url | String | no |
customInfo | The custom parameter carried by the callback | object | no |
callbackBody | Callback request body | String | no |
objectId | The returned resource id, which needs to be carried in the resource/create interface | long | no |
signature | The signature of the certificate uploaded by Kingsoft Cloud | string | no |
policy | Kingsoft Cloud's policy for uploading credentials | string | no |
The response body of the failed request is
{
"code": <errorCode>,
"message": <errorMessage>,
"data": null
}