How can I delete folder on s3 with node.js?

后端 未结 7 953
误落风尘
误落风尘 2021-01-30 10:48

Yes, I know. There is no folder concept on s3 storage. but I really want to delete a specific folder from s3 with node.js. I tried two solutions, but both didn\'t work. My code

7条回答
  •  心在旅途
    2021-01-30 11:10

    You can delete an empty folder the same way you delete a file. In order to delete a non-empty folder on AWS S3, you'll need to empty it first by deleting all files and folders inside. Once the folder is empty, you can delete it as a regular file. The same applies to the bucket deletion. We've implemented it in this app called Commandeer so you can do it from a GUI.

提交回复
热议问题