You can call this operation to cancel a multipart upload task and delete the parts generated in the task.

Usage notes

When you call AbortMultipartUpload, note the following items:

  • You must provide the upload ID of the multipart upload task that you want to cancel.
  • When you cancel a multipart upload task, parts that are being uploaded cannot be deleted.
  • After a multipart upload task is canceled, the upload ID of the task cannot be used to perform any operations and the parts uploaded by the task are deleted.
  • We recommend that you complete or cancel multipart upload tasks that are not complete in a timely manner because parts generated by these tasks consume storage spaces and incur storage fees.

Request structure

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

Request elements

Element Type Required Description
uploadId String Yes The ID of the multipart upload task.

For more information about other common request headers such as Host and Date, 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
    Connection: keep-alive
    x-oss-request-id: 059a22ba-6ba9-daed-5f3a-e48027df****
    Date: Wed, 22 Feb 2012 08:32:21 GMT

SDK

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

Error codes

Error code HTTP status code Description
NoSuchUpload 404 The error message returned because the specified upload ID does not exist.