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

Delete explicit Content-Type for FormData input #268

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Jun 10, 2024

Follow-up to #184

The multipart/form-data header set in createFile is missing a boundary, which causes uploads to fail. Deleting this header in request allows fetch to automatically generate the boundary for the FormData object1.

Footnotes

  1. We can't just omit the header, as it would otherwise default to application/json.

@mattt mattt merged commit 9b4bb64 into main Jun 10, 2024
18 checks passed
@mattt mattt deleted the mattt/fix-multipart-upload branch June 10, 2024 10:55
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.

1 participant