Skip to content
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

feat: add useMultipart flag #162

Merged
merged 2 commits into from
Mar 4, 2024
Merged

feat: add useMultipart flag #162

merged 2 commits into from
Mar 4, 2024

Conversation

friendlymatthew
Copy link
Collaborator

Closes #158

In our init(), this PR introduces a Config which contains the following:

export type Config = {
     useMultipartByteRanges?: boolean
}

We drill this through and in range-request.ts, we add logic where if that flag is either undefined or false, we'll resolve each range individually, else we'll continue with multi-fetching. If we reach a 200 response when multi-fetching, we'll warn the user that this flag hasn't been set.

Tested via local

Copy link

github-actions bot commented Mar 4, 2024

src/index.ts Outdated Show resolved Hide resolved
src/range-request.ts Outdated Show resolved Hide resolved
src/range-request.ts Outdated Show resolved Hide resolved
src/range-request.ts Outdated Show resolved Hide resolved
@friendlymatthew friendlymatthew enabled auto-merge (squash) March 4, 2024 17:06
@friendlymatthew friendlymatthew merged commit f3a8918 into main Mar 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flag to enable/disable multipart/byteranges
2 participants