Skip to content

Commit ddc715b

Browse files
fix: do not call path.Base on ContentType
1 parent 452bf4e commit ddc715b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/apiform/encoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func (e *encoder) newReaderTypeEncoder() encoderFunc {
319319
filename = path.Base(named.Name())
320320
}
321321
if typed, ok := reader.(interface{ ContentType() string }); ok {
322-
contentType = path.Base(typed.ContentType())
322+
contentType = typed.ContentType()
323323
}
324324

325325
// Below is taken almost 1-for-1 from [multipart.CreateFormFile]

0 commit comments

Comments
 (0)