rmr
rmr
CDCloudflare Developers
Created by rmr on 1/29/2024 in #general-help
listobjectv2 pagination
Dears, I hope you are well. I would like to use the https://{{account-id}}.r2.cloudflarestorage.com/{{r2-bucket}} endpoint with pagination on an arbitrary number of keys per page. For example, I would like to set the max-keys to 20, having 100 keys in the bucket, with a continuation token that allows me to query the 21-40 keys. My issue is that the continuation token is not being sent for such small amounts. Also, I have another concern. Suppose that the pagination logic works, how can I know the total amount of items in the bucket without iterating through all of the pages? (To know how many pages are left)
5 replies