-
Notifications
You must be signed in to change notification settings - Fork 122
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
Fix if the body contains a File or FileList object will be converted to {} #183
Conversation
@LuHugo: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Codecov Report
@@ Coverage Diff @@
## master #183 +/- ##
==========================================
+ Coverage 92.51% 92.55% +0.03%
==========================================
Files 3 3
Lines 401 403 +2
Branches 116 117 +1
==========================================
+ Hits 371 373 +2
Misses 28 28
Partials 2 2
Continue to review full report at Codecov.
|
If we can add a unit test for it, I’d be happy to ship it! |
@fbartho In the current version, the bodySerializer function in bodySerializers can't get the File object, and the property in the body always returns {}, which is converted to a normal object. I expect the body params{
name: "Alice",
avatar: File
} Actually I get the body params{
name: "Alice",
avatar: {}
} It was converted to a normal object, which prevented me from uploading files. |
I hear you @LuHugo. Is there a way to write a unit test that verifies that this behavior is working? I wouldn't want future regressions to break it accidentally. |
@fbartho Unit test has been added |
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.
Woo! Thanks @LuHugo
Release to npm? |
Published in v0.7.1: |
Fix if the body contains a File or FileList object will be converted to {}