All Products
Search
Document Center

Object Storage Service:AbortMultipartUpload

Last Updated:Dec 18, 2023

Cancels a multipart upload task and deletes the parts uploaded in the task.

Usage notes

  • Upload ID

    The upload ID of the multipart upload task is required to call the AbortMutipartUpload operation.

  • The parts that correspond to the upload ID not uploaded

    After you call the AbortMutipartUpload operation, parts that are being uploaded are not deleted.

  • The parts that correspond to the upload ID uploaded

    • If the CompleteMutipartUpload operation is called, no parts or objects are deleted and the NoSuchUpload error code is reported after you call the AbortMutipartUpload operation. This is because no operations are allowed by using the upload ID of the multipart upload task after the CompleteMutipartUpload operation is called.

    • If the CompleteMutipartUpload operation is not called, only parts that are uploaded are deleted after you call the AbortMutipartUpload operation.

  • Storage fees

    We recommend that you complete or cancel multipart upload tasks in a timely manner because parts that are uploaded by these tasks consume the storage capacity and incur storage fees.

Request syntax

DELETE /ObjectName?uploadId=UploadId HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: Signature

Request elements

Element

Type

Required

Example

Description

uploadId

String

Yes

0004B9895DBBB6E****

The ID of the multipart upload task.

For more information about other common request headers, such as Host and Date, see Common request headers.

Response headers

This request contains only common response headers. For more information, see Common HTTP headers.

Examples

  • Sample request

    Delete /multipart.data?&uploadId=0004B9895DBBB6E****  HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Wed, 22 Feb 2012 08:32:21 GMT
    Authorization: OSS qn6qrrqxo2oawuk53otf****:J/lICfXEvPmmSW86bBAfMmUm****
  • Sample response

    HTTP/1.1 204 
    Server: AliyunOSS
    Content-length: 0
    Connection: keep-alive
    x-oss-request-id: 059a22ba-6ba9-daed-5f3a-e48027df****
    Date: Wed, 22 Feb 2012 08:32:21 GMT
    x-oss-server-time: 86

OSS SDKs

You can use OSS SDKs for the following programming languages to call the AbortMultipartUpload operation:

Error codes

Error code

HTTP status code

Description

NoSuchUpload

404

The specified upload ID does not exist.