Skip to content

Commit 4b83bc9

Browse files
authored
Merge pull request #272 from deploymenttheory/fix-multipart_uploads
fix: update encoding type validation in DoMultiPartRequest to include…
2 parents 0dd995c + a530953 commit 4b83bc9

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)