yii2-aws-s3 icon indicating copy to clipboard operation
yii2-aws-s3 copied to clipboard

Bulk delete files in folder or delete entire folder with files.

Open ANulikJan opened this issue 3 years ago • 0 comments

Hi there. Is there a way we can delete all the content of the given folder or the entire folder with one request?

For example I want to delete the "main/shipping_labels/test/555/" folder, or all files inside it.

The suggested method "delete" is not working for the folder. It accepts only the filename, or I can delete the folder if it is empty.

I have tried to delete the content in this way, but it is still not working - $s3->commands()->delete("main/shipping_labels/test/555/*")->execute();

Please give an advice.

ANulikJan avatar May 23 '22 14:05 ANulikJan