HCP Tenant Management Help
You use the HTTP POST method with the uploadId query parameter to complete a multipart upload.
To complete a multipart upload, you must be an authenticated user. You need to use the same user account as the account used in the request to initiate the multipart upload. Additionally, you need write permission for the bucket where the multipart upload was initiated.
You use the uploadId query parameter to specify the upload ID of the multipart upload you're completing. If the upload ID you specify doesn't match the upload ID of an in-progress multipart upload or isn't associated with the object specified in the request, HCP returns a 404 (Not Found) status code and does not complete the multipart upload.
To specify the list of parts to use when completing a multipart upload, you use an XML request body . You identify each part by its part number and the ETag returned when the part was uploaded. The list of parts must be in ascending order by part number. For the format of the request body, see Request body (POST object complete multipart upload).
Only the parts listed in the request to complete a multipart upload are used as data for the resulting object. Parts that were uploaded for the multipart upload but that are not listed in the request are automatically deleted after the request is processed.
To be completed, a multipart upload must have at least one part.
When you complete a multipart upload, you become the owner of the resulting object. For information about object ownership, see Object owners.
If a request to complete a multipart upload includes any custom metadata (x-amz-meta-) headers, HCP returns a 400 (Bad Request) status code and does not complete the multipart upload.
HCP ignores ACL headers in requests to complete a multipart upload.
Conditionally completing a multipart upload
If versioning is enabled for a bucket, you can use a multipart upload to create a new version of an object in the bucket. However, between the time you initiated the multipart upload and the time processing of the request to complete the multipart upload finishes, another user may have stored a different new version of the object (by using either a single PUT object request or a multipart upload).
To ensure that the version of the object that was most recent when you initiated the multipart upload is still the most recent version, you can include the If-Match header in the request to complete the multipart upload. If the value you specify for the If-Match header matches the ETag of the most recent version of the object, HCP completes the multipart upload. If the value doesn't match the ETag or if the object doesn't exist, HCP returns an error response body and does not complete the multipart upload.
![]() |
Note: The If-Match header is not part of the Amazon S3 API. |
Complete multipart upload request result
Processing a request to complete a multipart upload can take several minutes. When processing starts, HCP returns a 200 (OK) status code. While processing continues, HCP periodically sends white-space characters to prevent the connection from timing out.
If a request to complete a multipart upload succeeds, the response body contains information about the resulting object. If the request fails, the response body contains error information. Therefore, to determine the outcome of a request to complete a multipart upload, you need to check the content of the response body in addition to the status code.
These errors can cause a request to complete a multipart upload to fail after HCP returns the 200 (OK) status code:
•The list of parts in the request body includes a part, other than the last part, that is smaller than one megabyte.
•The list of parts in the request body includes one or more part numbers that are not the number of an uploaded part.
•The ETag associated with one or more part numbers listed in the request body is not the ETag returned for the part with the specified part number.
•The parts in the request body are not listed in ascending order.
•The request includes the If-Match request header, and either the value specified by the header does not match the ETag of the most recent version of the specified object, or the specified object does not already exist.
For information about error response bodies, see Error response body.
Trademarks and Legal Disclaimer
© 2015, 2019 Hitachi Vantara Corporation. All rights reserved.