Skip to content

Commit

Permalink
multipart supprt added for deployment creation
Browse files Browse the repository at this point in the history
Signed-off-by: ace-codemaker <[email protected]>
  • Loading branch information
ace-codemaker authored and liderman committed Jun 27, 2023
1 parent 583543d commit 0c428cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ func (d *Deployment) Create(deploymentCreate ReqDeploymentCreate) (deployment *R
if fw, err = w.CreateFormFile(key, x.Name()); err != nil {
return nil, err
}
} else if _, ok := resource.(multipart.File); ok {
if fw, err = w.CreateFormFile(key, key); err != nil {
return nil, err
}
} else {
if fw, err = w.CreateFormField(key); err != nil {
return nil, err
Expand Down

0 comments on commit 0c428cc

Please sign in to comment.