-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Pass MaxMultipartMemory when FormFile is called #1600
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1600 +/- ##
==========================================
+ Coverage 99.27% 99.27% +<.01%
==========================================
Files 39 39
Lines 1928 1929 +1
==========================================
+ Hits 1914 1915 +1
Misses 10 10
Partials 4 4
Continue to review full report at Codecov.
|
@isgj please add some test, thanks! |
There was already a test for the |
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.
LGTM
@appleboy please help review, thanks! |
When `gin.Context.FormFile("...")` is called the `engine.MaxMultipartMemory` is never used. This PR makes sure that the `MaxMultipartMemory` is passed and removes 2 calls to `http.Request.ParseForm` since they are called from `http.Request.ParseMultipartForm`
When
gin.Context.FormFile("...")
is called theengine.MaxMultipartMemory
is never used. This PR makes sure that theMaxMultipartMemory
is passed and removes 2 calls tohttp.Request.ParseForm
since they are called fromhttp.Request.ParseMultipartForm