copyPartMultiPartUpload

This method is used to upload a part by copying data from existing object as data source to get Etag value. This Etag will be used complete multi part request.
String copyPartMultiPartUpload(String awsLocation, String uploadId, Long partNumber)
Parameters:
awsLocation: The name of key to be uploaded as file location. You can get this value from the fileLocation of UploadRequestInfo object.
uploadId: The upload Id that you get this Id from the initializeMultipartUpload request as a return value.
partNumber: The order of uploaded part.
Return Value: The method will return the Etag as a String.


Example code:

List<String> eTagList = new List <String>(); for(Integer i = 1; i<= multiPartsSize; i++) { String eTag = cg.SDriveTools.copyPartMultiPartUpload (uploadRequestInfos.fileLocation, uploadId, i); eTagList.add(eTag); }


While uploading multi parts, you must give the key parameters with the format shown below. It must
be start with zero.
"key" : fileLocation + '.' +0 (partNumber = 1)
to
"key" : fileLocation + '.' + multiPartsSize-1 (partNumber = multiPartsSize