Canceling a Multipart Upload Task

Functions

You can call this API to cancel a multipart upload task. You cannot upload or list parts after operations to merge parts or abort a multipart upload are performed.

Request Syntax

DELETE /ObjectName?uploadId=uplaodID HTTP/1.1
Host: bucketname.obs.region.example.com
Date: date
Authorization: auth

Request Parameters

This request uses message parameters to specify the multipart upload task number. Table 1 describes the parameters.

Table 1 Request parameters

Parameter

Description

Mandatory

uploadId

Indicates a multipart upload.

Type: string

Yes

Request Headers

This request uses common headers. For details, see Table 3.

In addition to the common request headers, the header listed in Table 2 may be used.

Table 2 Additional request header

Header

Type

Mandatory (Yes/No)

Description

x-obs-request-payer

String

No

Definition:

Indicates that the requester agrees to pay for the request and traffic.

Constraints:

If this header is not included in the request when the requester tries to access a requester-pays bucket, the authentication fails and error "403 Forbidden" is returned.

Range:

requester

Default value:

None

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code
Date: date

Response Headers

The response to the request uses common headers. For details, see Table 1.

In addition to the common response headers, the header listed in Table 3 may be used.

Table 3 Additional response header

Header

Type

Description

x-obs-request-payer

string

Definition:

Indicates that the requester agrees to pay for the request and traffic.

Constraints:

If this header is not included in the request when the requester tries to access a requester-pays bucket, the authentication fails and error "403 Forbidden" is returned.

Range:

requester

Default value:

None

Response Elements

This response contains no elements.

Error Responses

  1. If the AK or signature is invalid, OBS returns 403 Forbidden and the error code is AccessDenied.

  2. If the requested bucket is not found, OBS returns 404 Not Found and the error code is NoSuchBucket.

  3. If you are neither the initiator of a multipart upload nor the bucket owner, OBS returns 403 Forbidden.

  4. If the operation is successful, OBS returns 204 No Content to the user.

Other errors are included in Table 2.

Sample Request

DELETE /object02?uploadId=00000163D46218698DF407362295674C HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: WED, 01 Jul 2015 05:28:27 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:QmM2d1DBXZ/b8drqtEv1QJHPbM0=

Sample Response

HTTP/1.1 204 No Content
Server: OBS
x-obs-request-id: 8DF400000163D463E02A07EC2295674C
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCTp5YDlzn0UgqG3laRfkHLGyz7RpR9ON
Date: WED, 01 Jul 2015 05:28:27 GMT