mirror of
https://github.com/openai/openai-go.git
synced 2026-04-01 17:17:14 +09:00
fix: do not call path.Base on ContentType (#225)
This commit is contained in:
committed by
GitHub
parent
9936c4763f
commit
d8ea9b3afd
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user