Skip to content

Commit

Permalink
Merge pull request #34 from openownership/267-1000-files
Browse files Browse the repository at this point in the history
[#267] fix Adapters::S3Adapter list_objects limited to 1000 files
  • Loading branch information
tiredpixel authored May 30, 2024
2 parents 625564e + 329f370 commit c08dd81
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/register_common/adapters/s3_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:)
Expand Down

0 comments on commit c08dd81

Please sign in to comment.