Skip to content

Commit 54ef15c

Browse files
committedFeb 10, 2025
fix: do not call path.Base on ContentType (#3913)
1 parent da67a46 commit 54ef15c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎internal/apiform/encoder.go

+1-1
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)
Please sign in to comment.