AWS S3 object listing

前端 未结 6 2160
南方客
南方客 2021-02-06 20:52

I am using aws-sdk using node.js. I want to list images in specified folder e.g.\"This

6条回答
  •  情话喂你
    2021-02-06 21:03

    Folders are illusory, but S3 does provide a mechanism to emulate their existence.

    If you set Delimiter to / then each tier of responses will also return a CommonPrefixes array of the next tier of "folders," which you'll append to the prefix from this request, to retrieve the next tier.

    If your Prefix is a "folder," append a trailing slash. Otherwise, you'll make an unnecessary request, because the first request will return one common prefix. E.g., folder "foo" will return one common prefix "foo/".

提交回复
热议问题