Copies an object.
public func copyObject(srcObjectName: String, destBucket: String, destObjectName: String) throws -> Void
THis method copies the object specified by SrcObjectName (in the bucket currently selected by Bucket) to the object specified by DestObjectName in DestBucket. If DestBucket is empty, the bucket specified by Bucket is used as the destination bucket.
If the VersionId property is non-empty, the specified version of the source object will be used as the copy source. In this case, DestObjectName may be the same as SrcObjectName to "promote" the version, copying its contents back to the base object.
If there are any metadata items present in the Metadata* properties, they will set on the destination object; otherwise, the server will copy any metadata items present on the source object to the destination object.
- Objects may only be copied to buckets that exist within the same region.
- Objects larger than 5GB cannot be copied using this method. To copy such objects, start a new multipart upload for the destination object using StartMultipartUpload, and then use the CopyPart method to create parts for said multipart upload using the source object's data.