From 444aad3d24ceb62f651177e09e8aef4adcd6819b Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Mon, 10 Feb 2025 21:11:23 +0000 Subject: [PATCH] fix: do not call path.Base on ContentType --- internal/apiform/encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]