fix: do not call path.Base on ContentType (#225)

This commit is contained in:
stainless-app[bot]
2025-02-10 21:11:29 +00:00
committed by GitHub
parent 9936c4763f
commit d8ea9b3afd

View File

@@ -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]