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!
The folder will auto delete when it's empty.
So if you delete your file and refresh the root folder, you will see that it's gone ! Aws-Magic =)