Skip to content

@vercel/blob: pagination with limit: N, N <1000 #835

@gheorghemolnar

Description

@gheorghemolnar

I'm currently evaluating the @vercel/storage blob in my project and I came across this pottential issue while using list with pagination.

Context:

  • I've set up the token
  • a total of 6 files uploaded on my project storage
  • using the list with limit of 2

Problem Description:

  • i'm issuing the first request with no cursor

    • I get the first 2 results, with: 'cursor' populated with a string and 'hasMore': true
  • on the 2nd request, I put the cursor and its previously received value, in query

    • I get the same first results il 'files', with 'cursor' populated with a different string and 'hasMore': true

The behaviour of the 2nd request is happening for the followings request:
- cursor populated every time with a differrent string value
- hasMore is polpulated with true, event if it should return hasMore: false (ex. on the 4th time call of the 'limit' function).

I can get all the results (6 of them), only if I don't specify the limit in the optional parameters of the limit function.
Can you give me some insights on this ?
Thank you !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions