-
Notifications
You must be signed in to change notification settings - Fork 491
R2-3560: Implement ListParts and ListMultipartUploads for R2 Binding
#5596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
586c50e to
c1ecf41
Compare
c1ecf41 to
8bb7131
Compare
- Add range validation (1-1000) for `limit` parameter in `listMultipartUploads` - Change default limit from 0xffffffff to 0x3e8 (1000) in R2ListMultipartUploadsRequest - Fix `partNumberMarker` validation to require positive values (p > 0) instead of non-negative (p >= 0) - Fix `listParts` to pass JWT authentication token to doR2HTTPGetRequest
8bb7131 to
c722755
Compare
| KJ_IF_SOME(o, options) { | ||
| KJ_IF_SOME(l, o.limit) { | ||
| JSG_REQUIRE(l >= 1 && l <= 1000, RangeError, | ||
| "limit must be between 1 and 1000 (inclusive). Actual value was: ", l); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a new requirement? Would this cause a new error to be thrown? If so, this might need a compat flag. If the code already errored here or this previously didn't work, then that might not be necessary.
|
|
||
| KJ_IF_SOME(o, options) { | ||
| KJ_IF_SOME(l, o.limit) { | ||
| JSG_REQUIRE(l >= 1 && l <= 1000, RangeError, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider moving the 1000 to a constant.
Should be released in tandem with cloudflare/workers-sdk#11562.