Cancels a multipart upload task and deletes the uploaded parts.
Notes
-
Upload ID
You must specify the upload ID of the multipart upload task.
-
Parts still being uploaded
Parts that are still being uploaded when you call AbortMultipartUpload are not deleted.
-
Parts already uploaded
-
If CompleteMultipartUpload has already been called, no parts or objects are deleted and AbortMultipartUpload returns the NoSuchUpload error. The upload ID becomes invalid after the upload is completed.
-
If CompleteMultipartUpload has not been called, AbortMultipartUpload deletes only the uploaded parts.
-
-
Storage fees
Complete or cancel multipart upload tasks promptly. Uploaded parts consume storage and incur storage fees.
Permissions
By default, an Alibaba Cloud account has full permissions. RAM users or RAM roles under an Alibaba Cloud account do not have any permissions by default. The Alibaba Cloud account or account administrator must grant operation permissions through RAM policies or Bucket Policy.
|
API |
Action |
Description |
|
AbortMultipartUpload |
|
Cancels a multipart upload task and deletes uploaded parts. |
Request syntax
DELETE /ObjectName?uploadId=UploadId HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: Signature
当您在OSS ON云盒中调用该接口时,您需要将Host替换为云盒Endpoint。更多信息,请参见云盒Endpoint。
Request elements
|
Element |
Type |
Required |
Example |
Description |
|
uploadId |
String |
Yes |
0004B9895DBBB6E**** |
The ID of the multipart upload task. |
Other common request headers such as Host and Date are described in Common request headers.
Response headers
The response contains only 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: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e -
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
The following OSS SDKs support AbortMultipartUpload:
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 |
|
NoSuchUpload |
404 |
The specified upload ID does not exist. |