StartMultipartUpload Method
Starts a multipart upload.
Syntax
amazonglacier.startMultipartUpload(vaultName, archiveDesc, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method initiates a multipart upload operation. Multipart uploads are beneficial in situations where you wish to upload a large amount of data, or do not know how large the data will be when you begin uploading.
This method returns an UploadId that must be saved. This will be used to perform other operations with this upload.
ArchiveDesc may be set to a user friendly description of the archive, or empty string.
VaultName is the vault in which the archive will be created.
The data must be split into parts with a size (in megabytes) specified by PartSize. The part size must be a megabyte multiplied by a power of 2. For instance 1, 2, 4, and 8 are valid sizes. The minimum part size is 1, the maximum is 4096 (4GB). The default value of PartSize is 1.
Each part must be exactly PartSize megabytes in size except the last part. The last part will be smaller. For instance with a part size of 1, uploading a 10.2 megabyte file will have 11 parts. There will be 10 parts of size 1 MB, and 1 part of size .2 MB.
Parts may be uploaded in parallel by using separate class instances. When uploading a part with UploadPart a part number is specified so the data can be properly re-assembled in order when it reaches the server.
After all parts are uploaded call CompleteMultipartUpload to complete the operation. If parts of the archive were uploaded using separate instances of the class you must first list all parts of the archive by calling ListParts until PartMarker is empty (all parts are returned). Information about the parts is required when completing the multipart upload.
To cancel the operation, call AbortMultipartUpload.