更新时间:2022-11-07 12:02:44
这个问题存在,因为你试图再次上传同一文件。例如:
This problem exists because you are trying to upload the same file again. Example:
$s3 = new S3('XXX','YYYY', false);
$s3->putObjectFile('file.jpg','bucket-name','file.jpg');
$s3->putObjectFile('file.jpg','bucket-name','newname-file.jpg');
要解决这个问题,只需要复制该文件,并赋予它新的名称,然后将其上传正常。
To fix it, just copy the file and give it new name then upload it normally.
例如:
$s3 = new S3('XXX','YYYY', false);
$s3->putObjectFile('file.jpg','bucket-name','file.jpg');
now rename file.jpg to newname-file.jpg
$s3->putObjectFile('newname-file.jpg','bucket-name','newname-file.jpg');