Skip to content

Commit a530953

Browse files
committed
fix: update encoding type validation in DoMultiPartRequest to include 'byte'
1 parent ca84249 commit a530953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httpclient/multipartrequest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type UploadState struct {
6565
//
6666
// // Use `result` or `resp` as needed
6767
func (c *Client) DoMultiPartRequest(method, endpoint string, files map[string][]string, formDataFields map[string]string, fileContentTypes map[string]string, formDataPartHeaders map[string]http.Header, encodingType string, out interface{}) (*http.Response, error) {
68-
if encodingType != "raw" && encodingType != "base64" {
68+
if encodingType != "byte" && encodingType != "base64" {
6969
c.Sugar.Errorw("Invalid encoding type specified", zap.String("encodingType", encodingType))
7070
return nil, fmt.Errorf("invalid encoding type: %s. Must be 'raw' or 'base64'", encodingType)
7171
}

0 commit comments

Comments
 (0)