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
1. ObsClient->abortMultipartUpload(array $parameter) 2. ObsClient->abortMultipartUploadAsync(array $parameter, callable $callback)
Request Parameter
| Field | Type | Optional or Mandatory | Description |
|---|---|---|---|
| Bucket | string | Mandatory | Bucket name |
| Key | string | Mandatory | Object name |
| UploadId | string | Mandatory | Multipart upload ID |
Returned Result
| Field | Type | Description |
|---|---|---|
| HttpStatusCode | integer | HTTP status code |
| Reason | string | Reason description |
| RequestId | String | Request ID returned by the OBS server |
Sample Code
try {
$resp = $obsClient->abortMultipartUpload( [
'Bucket' => 'bucketname',
'Key' => 'objectkey',
'UploadId' => 'uploadid'
] );
printf ( "RequestId:%s\n", $resp ['RequestId'] );
} catch ( Obs\Common\ObsException $obsException ) {
printf ( "ExceptionCode:%s\n", $obsException->getExceptionCode () );
printf ( "ExceptionMessage:%s\n", $obsException->getExceptionMessage () );
} Last Article: Complete Multipart Upload
Next Article: POST Object restore
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.