Cancels a multipart upload task and deletes the parts uploaded in the task.
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.
Permissions
By default, an Alibaba Cloud account has full permissions on resources in the account. In contrast, RAM users and RAM roles associated with an Alibaba Cloud account initially have no permissions. To manage resources by using a RAM user or role, you must grant the required permissions via RAM policies or Bucket policies.
API | Action | Description |
API | Action | Description |
AbortMultipartUpload |
| Cancels a multipart upload task and deletes the uploaded parts. |
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 |
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
All headers in the response to a DescribeRegions request are common response headers. For more information, see Common response 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 qn6q**************:77Dv****************
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:
ossutil
For information about the ossutil command that corresponds to the AbortMultipartUpload operation, see abort-multipart-upload.
Error codes
Error code | HTTP status code | Description |
Error code | HTTP status code | Description |
NoSuchUpload | 404 | The specified upload ID does not exist. |