diff --git a/internal/apiform/encoder.go b/internal/apiform/encoder.go index 58905eab..555330ae 100644 --- a/internal/apiform/encoder.go +++ b/internal/apiform/encoder.go @@ -319,7 +319,7 @@ func (e *encoder) newReaderTypeEncoder() encoderFunc { filename = path.Base(named.Name()) } if typed, ok := reader.(interface{ ContentType() string }); ok { - contentType = path.Base(typed.ContentType()) + contentType = typed.ContentType() } // Below is taken almost 1-for-1 from [multipart.CreateFormFile]