diff --git a/params.go b/params.go index f523fa0..eaab2d0 100644 --- a/params.go +++ b/params.go @@ -282,6 +282,8 @@ func (params Params) encodeMultipartForm(writer io.Writer) (mime string, err err return } + defer file.Close() + _, err = io.Copy(dst, file) if err != nil {