The AWS PHP SDK documentation for deleteMatchingObjects states that it returns an integer: "Returns the number of deleted keys"
My media is deleted successfully but I get an empty value back where I'm supposed to get a count of deleted objects. Am I doing something wrong?
This is in the beforeDelete method of a CakePHP 2.x Model Behavior.
$s3 = new Aws\Sdk(array('version' => 'latest', 'region' => 'us-west-1', 'credentials' => array('key' => $this->s3Key, 'secret' => $this->s3Secret)));
$client = $s3->createS3();
$delete = $client->deleteMatchingObjects($this->s3ReadBucket, $this->fileGroupPrefix($model->name, $model->id));
$this->__logger($delete);
Aucun commentaire:
Enregistrer un commentaire