初始化分片 - InitiateMultipartUpload

初始化分片上传

Requests

Syntax:

POST /?uploads HTTP/1.1
Host: .cn-bj.ufileos.com
Authorization: 
Content-Length: 0

Request Parameters

Request Headers

Name Type DescriptionRequired
Authorization String 上传请求的授权签名 Yes
Content-LengthInteger请求body部分的长度No
X-Ufile-Storage-Class String 文件存储类型,分别是标准、低频、归档,对应有效值:STANDARD, IA, ARCHIVE No

Request Elements

说明:未使用。

Responses

Response Headers

Name Type Description
Content-Type String 响应body部分的类型
Content-LengthInteger响应body部分的长度
X-SessionId String 请求失败时返回本次请求的会话Id

Response Elements

Name Type Description
UploadIdString 本次分片上传的上传Id
BlkSize Integer分片的块大小
Bucket String 上传文件所属Bucket的名称
Key String 上传文件在Bucket中的Key名称

Example

Example Request:

POST /demokey?uploads HTTP/1.1
Host: .cn-bj.ufileos.com
Authorization: AutoAI demouser@ucloud.cn13424346821929713944:S5FVD2w613MKb/hisjaqHdjvn9U=
Content-Length: 0

Example Response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 121

{
    "UploadId": "0f188eb2-5e19-49c3-94c9-36fb5a0ff72a",
    "BlkSize": 4194304,
    "Bucket": "demobucket",
    "Key": "demokey"
}