Queries the upload URL of a file.
Debugging
Authorization information
Request syntax
POST /v2/file/get_upload_url HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request parameters. | |
| drive_id | string | Yes | The drive ID. | 1 |
| share_id | string | No | The share ID. | |
| file_id | string | Yes | The file ID. | 5d5b846942cf94fa72324c14a4bda34e81da635d |
| upload_id | string | Yes | The ID of the upload task. | 10166D06127B413BA1EC8ABB1144D111 |
| part_info_list | array<object> | Yes | The information about the file parts. | |
| object | No | |||
| part_number | integer | No | The serial number of a part. | 1 |
| parallel_sha1_ctx | object | No | The SHA-1 hash value of the file content before the file part. This parameter takes effect only if the parallel upload feature is enabled. | |
| h | array | No | The first to fifth 32-bit variables of the SHA-1 hash value of the file content before the file part. This parameter takes effect only if the parallel upload feature is enabled. | |
| long | No | The first to fifth 32-bit variables of the SHA-1 hash value of the file content before the file part. | 1 | |
| part_offset | long | No | The size of the file part. Unit: bytes. The value must be a multiple of 64. This parameter takes effect only if the parallel upload feature is enabled. | 10240 |
Response parameters
Examples
Sample success responses
JSONformat
{
"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": "https://data.aliyunpds.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E269772661",
"internal_upload_url": "https://data-vpc.aliyunpds.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E269772661",
"etag": "0CC175B9C0F1B6A831C399E269772661",
"parallel_sha1_ctx": {
"h": [
0
],
"part_offset": 10240
},
"upload_form_info": {
"bucket_name": "",
"oss_end_point": "",
"object_key": "",
"oss_access_key_id": "",
"oss_security_token": "",
"policy": "",
"signature": ""
},
"internal_upload_form_info": {
"bucket_name": "",
"oss_end_point": "",
"object_key": "",
"oss_access_key_id": "",
"oss_security_token": "",
"policy": "",
"signature": ""
},
"signature_info": {
"auth_type": "",
"signature": "",
"sts_token": ""
},
"parallel_sha256_ctx": {
"h": [
0
],
"part_offset": 0
}
}
]
}Error codes
For a list of error codes, visit the Service error codes.
