- request (UploadPartRequest)
- The UploadPartRequest that defines the parameters of the operation.
- callback (AsyncCallback)
- An AsyncCallback delegate that is invoked when the operation completes.
- state (Object)
- A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.
You must initiate a multipart upload before you can upload any part.
Your UploadPart request must include an upload ID and a part number. The upload ID is the ID returned by Amazon S3 in response to your Initiate Multipart Upload request. Part number can be any number between 1 and 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being uploaded. If you upload a new part using the same part number as an existing part, that part is overwritten.
To ensure data is not corrupted traversing the network, specify the Content-MD5 header in the Upload Part request. Amazon S3 checks the part data against the provided MD5 value. If they do not match, Amazon S3 returns an error.
When you upload a part, the UploadPartResponse response contains an ETag property. You should record this ETag property value and the part number. After uploading all parts, you must send a CompleteMultipartUpload request. At that time Amazon S3 constructs a complete object by concatenating all the parts you uploaded, in ascending order based on the part numbers. The CompleteMultipartUpload request requires you to send all the part numbers and the corresponding ETag values.
After you initiate a multipart upload and upload one or more parts, you must either complete or abort the multipart upload in order to stop getting charged for storage of the uploaded parts. Once you complete or abort the multipart upload, Amazon S3 will release the stored parts and stop charging you for their storage.