While mucking around with the AWS PHP SDK (v2) I accidently created a bunch of objects appended with " ". I can see these objects in the AWS console, S3 Browser and Cloudberry Explorer. The browsers show the file extension as, for example, JPG%0D%0A. All attempts to remove these objects via these tools fails.
I can list the objects successfully with:
$objects = $s3->getIterator('ListObjects', array('Bucket' => $bucket));
Passing the returned objects to
$result = $s3->deleteObject(array(
'Bucket' => $bucket,
'Key' => $object['Key']"
));
does not delete them and there doesn't seem to be a meaningful error message.
Does anyone know any other methods (via versionid perhaps) for deleting objects with non-printable characters? Or even a sample of how to print out the $result?
Please be gentle. I'm a PHP n00b. :)