Updated Amazon S3 API (markdown)

Chris Lu 2021-09-26 22:31:40 -07:00
parent 2af038cd06
commit c2fd3f4da5

@ -75,8 +75,15 @@ Not included:
| DeleteObject deletes a folder| Yes | No |
| same path for both a file and a folder| No | Yes |
By default, `weed s3` will automatically remove empty folders, to be consistent with AWS S3.
You can use `weed s3 -allowEmptyFolder` to toggle this behavior.
## Empty folders
SeaweedFS has directories while AWS S3 only has objects with "fake" directories. In AWS S3, if the last file is deleted in a directory, the directory will disappear also.
To be consistent with AWS S3, SeaweedFS tries to skip empty folders while listing. You can use `weed s3 -allowEmptyFolder` to toggle this behavior.
This is not so ideal. Another approach is to list current directory when deleting a file, which will slow down quite a bit especially when deleting multiple files. SeaweedFS did not take this approach.
The last approach, which is most efficient, is to maintain counters for each folder, and drop the folder as soon as it becomes empty. This is implemented in [[Cloud Monitoring]].
# Authentication
By default, the access key and secret key to access `weed s3` is not authenticated. To enable credential based access, you can choose static or dynamic configuration: