@vercel/blob: pagination with limit: N, N <1000
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 595
- Forks
- 101
- Avg merge
- 2h 24m
- Merged PRs (30d)
- 1
Description
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 !
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing @vercel/blob list pagination with six files, limit 2, and the cursor returned by each request. Check that each page advances without repeating results and that the final response reports hasMore: false; the payload names no files or tests to inspect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100