diff --git a/lib/register_common/adapters/s3_adapter.rb b/lib/register_common/adapters/s3_adapter.rb index 2a6bcb3..f09cc03 100644 --- a/lib/register_common/adapters/s3_adapter.rb +++ b/lib/register_common/adapters/s3_adapter.rb @@ -53,12 +53,8 @@ def upload_from_file_obj_to_s3(s3_bucket:, s3_path:, stream:) end def list_objects(s3_bucket:, s3_prefix:) - s3_client.list_objects( - { - bucket: s3_bucket, - prefix: s3_prefix - } - ).contents.map(&:key) + s3_client.list_objects({ bucket: s3_bucket, prefix: s3_prefix }) + .flat_map { |res| res.contents.map(&:key) } end def create_multipart_upload(s3_bucket:, s3_path:)