Listing files in a specific “folder” of a AWS S3 bucket

前端 未结 7 626
耶瑟儿~
耶瑟儿~ 2020-12-24 04:51

I need to list all files contained in a certain folder contained in my S3 bucket.

The folder structure is the following

/my-bucket/users/

        
7条回答
  •  梦毁少年i
    2020-12-24 05:12

    Based on @davioooh answer. This code is worked for me.

    ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName("your-bucket")
                .withPrefix("your/folder/path/").withDelimiter("/");
    

提交回复
热议问题