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

@tus/server: Split to multiple chunks on large incoming buffer #506

Merged
merged 2 commits into from
Oct 26, 2023

Conversation

mitjap
Copy link
Collaborator

@mitjap mitjap commented Oct 25, 2023

When handling incoming request, each buffer length is 64kb which StreamSplitter can handle without issues.

But in tests we might create buffers much larger than single part size, which might not be split as expected.

Works:
const readStream = Readable.from(Buffer.alloc(expectedChunks * optimalChunkSize))

Doesn't work:
const readStream = Readable.from([Buffer.alloc(expectedChunks * optimalChunkSize)])

@mitjap mitjap requested a review from Murderlon October 25, 2023 20:22
Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@Murderlon Murderlon merged commit 0bab40f into tus:main Oct 26, 2023
2 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.

2 participants