Retrieves an upload URL.
Try it now
Test
RAM authorization
Request syntax
POST /v2/file/get_upload_url HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body parameters. |
|
| drive_id |
string |
Yes |
The drive ID. |
1 |
| share_id |
string |
No |
The share ID. |
7JQX1FswpQ8 |
| file_id |
string |
Yes |
The file ID. |
5d5b846942cf94fa72324c14a4bda34e81da635d |
| upload_id |
string |
Yes |
The upload ID. |
10166D06127B413BA1EC8ABB1144D111 |
| part_info_list |
array<object> |
Yes |
The list of part information. |
|
|
array<object> |
No |
The part information. |
||
| part_number |
integer |
No |
The part number. |
1 |
| parallel_sha1_ctx |
object |
No |
The SHA-1 context for all data that precedes this part. This parameter is valid only for concurrent multipart uploads. |
|
| h |
array |
No |
The first five 32-bit variables of the SHA-1 context for all data that precedes this part. This parameter is valid only for concurrent multipart uploads. |
|
|
integer |
No |
The first five 32-bit variables of the SHA-1 context for all data that precedes this part. |
1 |
|
| part_offset |
integer |
No |
The total length of all data up to the previous block, in bytes. The value must be a multiple of 64. This parameter is valid only for concurrent multipart uploads. |
10240 |
| content_md5 |
string |
No |
||
| content_type |
string |
No |
||
| parallel_sha256_ctx |
object |
No |
||
| h |
array |
No |
||
|
integer |
No |
|||
| part_offset |
integer |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| domain_id |
string |
The domain ID. |
bj1 |
| drive_id |
string |
The drive ID. |
1 |
| file_id |
string |
The file ID. |
5d5b846942cf94fa72324c14a4bda34e81da635d |
| upload_id |
string |
The upload ID. |
10166D06127B413BA1EC8ABB1144D111 |
| create_at |
string |
The time when the upload task was created. |
2019-09-11T16:34:36.977Z |
| part_info_list |
array |
The list of part information. |
|
| UploadPartInfo |
The part information. |
Examples
Success response
JSON format
{
"domain_id": "bj1",
"drive_id": "1",
"file_id": "5d5b846942cf94fa72324c14a4bda34e81da635d",
"upload_id": "10166D06127B413BA1EC8ABB1144D111",
"create_at": "2019-09-11T16:34:36.977Z",
"part_info_list": [
{
"part_number": 1,
"part_size": 1024,
"upload_url": "",
"internal_upload_url": "",
"etag": "0CC175B9C0F1B6A831C399E269772661",
"parallel_sha1_ctx": {
"h": [
0
],
"part_offset": 0
},
"upload_form_info": {
"bucket_name": "",
"oss_end_point": "",
"object_key": "",
"oss_access_key_id": "",
"oss_security_token": "",
"policy": "",
"signature": "",
"endpoint": "",
"form_data": {
"key": ""
}
},
"internal_upload_form_info": {
"bucket_name": "",
"oss_end_point": "",
"object_key": "",
"oss_access_key_id": "",
"oss_security_token": "",
"policy": "",
"signature": "",
"endpoint": "",
"form_data": {
"key": ""
}
},
"signature_info": {
"auth_type": "",
"signature": "",
"sts_token": ""
},
"parallel_sha256_ctx": {
"h": [
0
],
"part_offset": 0
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.