All Products
Search
Document Center

Drive and Photo Service:GetUploadUrl

Last Updated:Aug 04, 2025

Queries the upload URL of a file.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/file/get_upload_url HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

drive_idstringYes

The drive ID.

1
share_idstringNo

The share ID.

7JQX1FswpQ8
file_idstringYes

The file ID.

5d5b846942cf94fa72324c14a4bda34e81da635d
upload_idstringYes

The ID of the upload task.

10166D06127B413BA1EC8ABB1144D111
part_info_listarray<object>Yes

The information about the file parts.

objectNo
part_numberintegerNo

The serial number of a part.

1
parallel_sha1_ctxobjectNo

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.

harrayNo

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.

longNo

The first to fifth 32-bit variables of the SHA-1 hash value of the file content before the file part.

1
part_offsetlongNo

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

ParameterTypeDescriptionExample
object

The response parameters.

domain_idstring

The domain ID.

bj1
drive_idstring

The drive ID.

1
file_idstring

The file ID.

5d5b846942cf94fa72324c14a4bda34e81da635d
upload_idstring

The ID of the upload task.

10166D06127B413BA1EC8ABB1144D111
create_atstring

The time when the upload task was created.

2019-09-11T16:34:36.977Z
part_info_listarray

The information about the file parts.

UploadPartInfo

The information about a file part.

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.