Get Object Upload Information
POST/v1/storages/get-objects-upload-info
Batch Obtain Required Information for Uploading Objects.
Request
- application/json
Body
arrayrequired
Upload object request parameters, in array format.
- Array [
- Array [
- ]
- ]
objectId Object ID, e.g., file name (string)required
signedHeader object
property name* string[]
string
Responses
- 200
- default
Returned on success
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- v1GetObjectsUploadInfoResponseItemSuccess
- v1GetObjectsUploadInfoResponseItemError
- ]
oneOf
uploadUrl Object upload URL
downloadUrl Download URL of the object after upload (without URL encoding)
downloadUrlEncoded URL-encoded download URL of the object after upload
token Token required for upload, to be filled in X-Cos-Security-Token header (string)
authorization Authorization information required for upload, to be filled in Authorization header (string)
cloudObjectMeta Metadata information required for upload, to be filled in X-Cos-Meta-Fileid header (string)
cloudObjectId Cloud object ID after upload (string)
objectId Object ID for this request (string)
code Error code returned when request for this object fails (string)
message Error message returned when request for this object fails (string)
[
{
"uploadUrl": "https://url/file.jpg%3FExpires%3D123",
"downloadUrl": "https://url/file.jpg?Expires=123",
"downloadUrlEncoded": "https://url/file.jpg%3FExpires%3D123",
"token": "token",
"authorization": "q-sign-algorithm=sha1&q-ak=",
"cloudObjectMeta": "metadata",
"cloudObjectId": "cloud://your-envId.bucket/file.jpg?Expires=123",
"objectId": "file.jpg"
},
{
"code": "COS_ACTION_FAILED",
"message": "Execute COS action failed."
}
]
General error message. See https://docs.cloudbase.net/error-code/service
Response Headers
X-Request-Id string
Request ID
- application/json
- Schema
- Example (from schema)
- InvalidHost
Schema
code Error code (string)
message Error message (string)
requestId Request ID (string)
{
"code": "string",
"message": "string",
"requestId": "string"
}
Invalid request address
{
"code": "INVALID_HOST",
"message": "xxx",
"requestId": "xxx"
}
Loading...