Khawer Zeshan
Khawer Zeshan

Reputation: 9646

Amazon AWS Pagination on bucket files

I am storing images in Amazon S3 bucket. Assume the bucket has 3,000 images. When i call the list_objects it returns me all the 3,000 images in an array. So my question is can we do pagination on the bucket? for example return me 100 images and when user will click on 2nd page the list_objects should return other 100 images. This way the request will be faster and will work fine on slower internet connections.

Upvotes: 0

Views: 2886

Answers (1)

Avinash T.
Avinash T.

Reputation: 2349

Amazon S3 supports pagination, you have to use keyMarker and maxResults in listObjects() method to implement pagination -

Find out more about this on -

http://www.barneyb.com/barneyblog/2010/12/23/amazon-s3-cfc-paged-lists/

Upvotes: 1

Related Questions