• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (Python SDK)
  4. Objects-Related APIs
  5. DELETE Multipart upload

DELETE Multipart upload

API Description

You can use this API to abort a multipart upload in a specified bucket by using the multipart upload ID.

Method Definition

ObsClient.abortMultipartUpload(bucketName, objectKey, uploadId)

Request Parameter

Field

Type

Optional or Mandatory

Description

bucketName

str

Mandatory

Bucket name

objectKey

str

Mandatory

Object name

uploadId

str

Mandatory

Multipart upload ID

Returned Result

Type

Description

GetResult

SDK common result object

Sample Code

try:
    resp = obsClient.abortMultipartUpload('bucketname', 'objectkey', 'uploadid') 
      
    if resp.status < 300: 
        print('requestId:', resp.requestId) 
    else: 
        print('errorCode:', resp.errorCode) 
        print('errorMessage:', resp.errorMessage)
except:
    import traceback
    print(traceback.format_exc())