CopyObject Method

Copies an object.

Object Oriented Interface

public function doCopyObject($srcobjectname, $destbucket, $destobjectname);

Procedural Interface

ipworkss3_s3client_do_copyobject($res, $srcobjectname, $destbucket, $destobjectname);

Remarks

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.

Notes:

  • 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.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks S3 2020 PHP Edition - Version 20.0 [Build 7722]