mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 12:12:12 +08:00
Merge 41308005db0fdefb8896a74bef356c7390547994 into 077a2f39c85700ba0823f85ed29cec0c8f2cbdfc
This commit is contained in:
commit
23aea81b9e
@ -32,6 +32,14 @@ func (r *multipartRequest) TrySet(value reflect.Value, field reflect.StructField
|
||||
return setByForm(value, field, r.MultipartForm.Value, key, opt)
|
||||
}
|
||||
|
||||
// CleanUp clean up the multipart request
|
||||
func (r *multipartRequest) CleanUp() error {
|
||||
if r.MultipartForm != nil {
|
||||
return r.MultipartForm.RemoveAll()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func setByMultipartFormFile(value reflect.Value, field reflect.StructField, files []*multipart.FileHeader) (isSet bool, err error) {
|
||||
switch value.Kind() {
|
||||
case reflect.Ptr:
|
||||
|
Loading…
x
Reference in New Issue
Block a user