Skip to main content
Skip table of contents


This method is used to complete attachments upload once the files have been uploaded to Amazon S3.
List<ResultObject> completeUpload(List<ID> wipIds)
wipIds: List of Salesforce ids for attachment "file" records. These IDs have been returned from the initializeUpload() method for each file record.
Return Value: The method will return the list of Result Object (Figure 127), which holds filecompletion status information.


  1. If you want to confirm that file(s) are successfully uploaded to Amazon, you can use the getAmazonHeader() method to get headers which is returned by Amazon S3 for a given file. You can also compare the ETag header, the MD5 checksum calculated by Amazon when the file is uploaded to S3, with the MD5 that you calculate for the file(s).

  2. If you set the success{_}action_status to 201 status code during the upload process, you can also use XML document which is returned by Amazon S3 to compare ETag header with MD5 check sum.

Example code:

List<Id>wipIds = new List<Id>();
wipIds.add(ID.valueOf(uploadRequestInfos .fileWipId));
List<cg.ResultObject>resultObjects = cg.SDriveTools.completeUpload(wipIds);

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.