fix max objects per request

This commit is contained in:
Page Asgardius 2022-12-11 19:26:55 -07:00
parent 260c5d4390
commit d76593e55b
2 changed files with 4 additions and 4 deletions

View file

@ -220,7 +220,7 @@ public class BucketSelect extends AppCompatActivity {
public void run() {
try {
//Your code goes here
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(8000);
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(1000);
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
ObjectListing result = s3client.listObjects(orequest);
ArrayList<String> objectl = new ArrayList<String>();

View file

@ -106,9 +106,9 @@ public class ObjectSelect extends AppCompatActivity {
//List<Bucket> buckets = s3client.listBuckets();
ListObjectsRequest orequest;
if (treelevel == 0) {
orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(8000).withDelimiter("/");
orequest = new ListObjectsRequest().withBucketName(bucket).withMaxKeys(1000).withDelimiter("/");
} else {
orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(prefix).withMaxKeys(8000).withDelimiter("/");
orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(prefix).withMaxKeys(1000).withDelimiter("/");
}
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
ObjectListing result = s3client.listObjects(orequest);
@ -578,7 +578,7 @@ public class ObjectSelect extends AppCompatActivity {
//Your code goes here
//List<Bucket> buckets = s3client.listBuckets();
if (folder) {
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(object).withMaxKeys(8000);
ListObjectsRequest orequest = new ListObjectsRequest().withBucketName(bucket).withPrefix(object).withMaxKeys(1000);
//List<S3Object> objects = (List<S3Object>) s3client.listObjects(bucket, "/");
ObjectListing result = s3client.listObjects(orequest);
ArrayList<String> objectl = new ArrayList<String>();