GetUploadUrl - 获取上传地址

更新时间: 2023-11-24 14:04:31

获取上传地址。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST /v2/file/get_upload_url

请求参数

名称类型必填描述示例值
bodyobject

请求体参数。

drive_idstring

空间 id

1
share_idstring

分享id

7JQX1FswpQ8
file_idstring

文件id

5d5b846942cf94fa72324c14a4bda34e81da635d
upload_idstring

上传 id

10166D06127B413BA1EC8ABB1144D111
part_info_listobject []

分片信息列表

part_numberinteger

段编号

1
parallel_sha1_ctxobject

该分片前所有数据的SHA1上下文,该字段只在多分片并发上传的模式下有效

harray

该分片前所有数据的SHA1上下文的第1-5个32位变量,该字段只在多分片并发上传的模式下有效

long

该分片前所有数据的SHA1上下文的第1-5个32位变量

1
part_offsetlong

到上一个数据块为止的总长度,字节,需要为64的倍数,该字段只在多分片并发上传的模式下有效

10240

返回参数

名称类型描述示例值
object

Schema of Response

domain_idstring

域id

bj1
drive_idstring

空间id

1
file_idstring

文件id

5d5b846942cf94fa72324c14a4bda34e81da635d
upload_idstring

上传id

10166D06127B413BA1EC8ABB1144D111
create_atstring

创建时间

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

分段信息列表

UploadPartInfo

分段信息

示例

正常返回示例

JSON格式

{
  "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": ""
      },
      "parallel_sha256_ctx": {
        "h": [
          0
        ],
        "part_offset": 0
      }
    }
  ]
}

错误码

访问错误中心查看更多错误码。

阿里云首页 网盘与相册服务 相关技术圈