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

companion: fix multipart upload #2490

Merged
merged 1 commit into from
Aug 31, 2020
Merged

Conversation

ifedapoolarewaju
Copy link
Contributor

following from this PR, I dug deeper and found that content-length is actually set by the request module for the case of form data. It is only not set for the case of read streams.

So this PR removes the FormData hack, and only sets content-length for the case of non-formdata uploads.

This PR is also important because the FormData hack actually doesn't work. It leveraged on an outdated internal behaviour of the request module which is no longer the same.

cc @johnnyperkins @mejiaej

Copy link
Contributor

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

I cant actually reproduce the original original problem (where PUT uploads could be rejected?), but this seems to work fine for me, so 🤞

@ifedapoolarewaju ifedapoolarewaju merged commit 84718fe into master Aug 31, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-remote-multipart branch August 31, 2020 15:10
@johnnyperkins
Copy link
Contributor

I cant actually reproduce the original original problem (where PUT uploads could be rejected?), but this seems to work fine for me, so crossed_fingers

I've just tested this and it's indeed working! Thanks for the effort!

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.

3 participants