我正在尝试使用Amazon s3 copyObject()方法复制对象。
以下是代码:
$copied = $s3->copyObject(array(
'Bucket' => $this->bucket,
'CopySource' => urlencode($this->bucket .'/'.$source_file),
'Key' => $this->dir.$jduid.'/'.$new_file
));
这种方法似乎工作正常。 如果我打印copyObject的结果我得到:
Guzzle\Service\Resource\Model Object
(
[structure:protected] =>
[data:protected] => Array
(
[LastModified] => 2016-10-26T07:32:34.373Z
[ETag] => "08fa3106a8b7839b803f4ddf65b56919"
[Expiration] =>
[CopySourceVersionId] =>
[ServerSideEncryption] =>
[SSECustomerAlgorithm] =>
[SSECustomerKeyMD5] =>
[SSEKMSKeyId] =>
[RequestCharged] =>
[RequestId] => c0a80b5b:1558b420117:3e7c6:9a9
)
)
但是我无法在存储桶中找到新复制的文件。任何建议。