Skip to content

Commit 5a4e491

Browse files
committed
log change
1 parent 2dfb033 commit 5a4e491

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.22.4
44

55
// Deploymenttheory
66
require (
7-
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef
7+
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240813121859-bc29e7589f2b
88
github.com/deploymenttheory/go-api-http-client-integrations v0.0.9-0.20240813093612-60356b3bf69a
99
)
1010

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC
4343
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4444
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
4545
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
46-
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef h1:SsCLj+eyB299Fc/w74IELj34Iav+QzXcww5Lhg/iqaE=
47-
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240801155241-3504d44ae1ef/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU=
46+
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240813121859-bc29e7589f2b h1:JrXycXUiqqMAlRFhAI6xJ4g7BTKj2JoVynur3Su92vU=
47+
github.com/deploymenttheory/go-api-http-client v0.2.11-0.20240813121859-bc29e7589f2b/go.mod h1:LKDnBcieS6CyikZjTKPpziVdxnTwzBHE6Hx1cuWRcuU=
4848
github.com/deploymenttheory/go-api-http-client-integrations v0.0.9-0.20240813093612-60356b3bf69a h1:HIlFFhq/mtL/e/HyLoAwSQmwNyJCxXBkCeRIl5GT1Cg=
4949
github.com/deploymenttheory/go-api-http-client-integrations v0.0.9-0.20240813093612-60356b3bf69a/go.mod h1:yzHJLElNOxwSFj1hW6i3rnhkdsJoBbwmepWKDVdGd6Y=
5050
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=

sdk/jamfpro/jamfproapi_icons.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,22 @@ func (c *Client) UploadIcon(filepath string) (*ResourceIcon, error) {
6767
"file": {filepath},
6868
}
6969

70-
formFields := map[string]string{}
70+
formDataFields := map[string]string{
71+
// "description": "a cat",
72+
}
7173

7274
contentTypes := map[string]string{
73-
"file": "multipart/form-data",
75+
// "image": "image/png",
7476
}
7577

76-
headersMap := map[string]http.Header{}
78+
formDataPartHeaders := map[string]http.Header{
79+
// "image": {
80+
// "Content-Disposition": []string{`form-data; name="a new image"; filename="cat.png"`},
81+
// },
82+
}
7783

7884
var response ResourceIcon
79-
resp, err := c.HTTP.DoMultiPartRequest("POST", endpoint, files, formFields, contentTypes, headersMap, &response)
85+
resp, err := c.HTTP.DoMultiPartRequest("POST", endpoint, files, formDataFields, contentTypes, formDataPartHeaders, &response)
8086
if err != nil {
8187
return nil, fmt.Errorf("failed to upload Icon: %v", err)
8288
}

0 commit comments

Comments
 (0)