我正在official PHP SDK of Amazon S3使用official service provider for laravel。我使用的是版本3.以下是我删除目标对象的代码:
$client = AWS::createClient('s3');
$result = $client->deleteObject(array(
'Bucket' => self::$bucketName,
'Key' => $dest
));
return $result;
这是回复信息:
Model Data
----------
Data can be retrieved from the model object using the get() method of the
model (e.g., `$result->get($key)`) or "accessing the result like an
associative array (e.g. `$result['key']`). You can also execute JMESPath
expressions on the result data using the search() method.
{
"DeleteMarker": false,
"VersionId": "",
"RequestCharged": "",
"@metadata": {
"statusCode": 204,
"effectiveUri": "https:\/\/s3-ap-southeast-1.amazonaws.com\/my-bucket-sandbox\/testing\/NjY0MA%253D%253D1481788705.jpg",
"headers": {
"x-amz-id-2": "UXlVnYeU0ID07N58C20G7yh5aKIdu7jj2QP8Ai8MZc+ay5KjAen4NHPA2oRONIAGyJXuE\/kw+Rs=",
"x-amz-request-id": "EBC374A27EE974FF",
"date": "Thu, 15 Dec 2016 08:05:47 GMT",
"server": "AmazonS3"
},
"transferStats": {
"http": [
[]
]
}
}
}
从DeleteMarker我知道删除操作失败,但返回消息中没有提供原因。以下是其他一些线索:
有关可能原因的任何建议吗?