-
Notifications
You must be signed in to change notification settings - Fork 2k
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: add calculated content-length for formdata and body cases #2466
Conversation
Thank you for the PR! I'll review this week |
933710e
to
4cef783
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the work! 🙏
I dropped some comments/suggestions
statusText: response.statusMessage, | ||
headers | ||
} | ||
_handleUploadMultipart (error, response, body, bytesUploaded) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this to _onMultipartComplete
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree, I think it is more descriptive.
Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
thank you for the work here! 🎉 |
@ifedapoolarewaju Thanks for the review and feedback. |
…loadit#2466) * companion: add calculated content-length for formdata and body cases * companion: append fieldname and emit error in form data Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com> * companion: change _handleUploadMultipart to _onMultipartComplete * companion: use async fs.stat Co-authored-by: Enrique Jhonatan Mejia Venegas <enrique.mejia@LIM-WS1807.local> Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
Hi, as described in this PR
content-length
is an expected header when uploading to s3. In this PR I'm adding context-length calculation for the formData scenario. Had to factor out the http request sinceform.getLength
from form-data expects a callback.