Release 3.3.0 - files.update fix, multipart form-data handling#430
Merged
Conversation
|
armando-rodriguez-cko
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This release improves multipart form-data handling in HTTP requests, specifically ensuring that
FormDatais properly serialized and sent in API calls. The changes fix a bug where the form-data instance was previously string-coerced (resulting in an invalid request body), and add comprehensive regression tests to prevent this issue from recurring.HTTP request handling improvements:
formDataToBufferutility to serializeFormDatastreams into a buffer, ensuring multipart bodies are transmitted correctly in HTTP requests.FormData, preventing accidental string coercion and ensuring the correctContent-Typeand body format.FormDatainstances when present, ensuring the multipart boundary is set correctly.Writablestream to support the new buffer serialization logic.Testing and regression coverage:
test/files/files.jsto verify that multipart requests include the correct fields and headers, and added a regression test for issue files.upload fails with purpose_required / purpose_invalid — API only accepts purpose as query param #418 to ensure the bug does not reoccur. [1] [2]