lundi 30 mars 2015

Remove entire object directory tree using AWS-SDK

I'm using the aws-sdk, and I'm trying to delete an object with the #delete_object method, for example:


s3.delete_object(bucket: ENV["AWS_BUCKET"]), key: "images/123/myimage.png"))


How can I delete the route (that's "images/123") instead of only the .png file? I don't want empty "folders". I've tested adding only the first part of the route (s3.delete_object(bucket: ENV["AWS_BUCKET"]), key: "images/")) in the key parameter but doesn't work. Thanks!





Aucun commentaire:

Enregistrer un commentaire