You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add an attachment to an e-mail draft. If I follow the doc:
`
requestBody := graphmodels.NewAttachment()
name := "smile"
requestBody.SetName(&name)
contentBytes := []byte("r0lGODdhEAYEAA7")
requestBody.SetContentBytes(&contentBytes)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to add an attachment to an e-mail draft. If I follow the doc:
`
requestBody := graphmodels.NewAttachment()
name := "smile"
requestBody.SetName(&name)
contentBytes := []byte("r0lGODdhEAYEAA7")
requestBody.SetContentBytes(&contentBytes)
attachments, err := graphClient.Me().Messages().ByMessageId("message-id").Attachments().Post(context.Background(), requestBody, nil)`
I get an error "requestBody.SetContentBytes undefined (type *models.Attachment has no field or method SetContentBytes) ".
From my research it should be
requestBody := graphmodels.NewFileAttachment()
Any chance on getting this fixed in the docs?Beta Was this translation helpful? Give feedback.
All reactions