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
ForceException: Binary data included but file attachment information is missing. If providing rich JSON/XML input in multipart REST, make sure to include Content-Type header in the part.
when I call PostFeedItemWithAttachmentAsync.
Here is my code:
var instanceUrl = auth.InstanceUrl;
var accessToken = auth.AccessToken;
var apiVersion = auth.ApiVersion;
var chatter = new ChatterClient(instanceUrl, accessToken, apiVersion);
var me = chatter.MeAsync<UserDetail>().Result;
var input = new ObjectFeedItemInput();
input.ObjectId = me.id;
var memoryStream = new MemoryStream();
stream.CopyTo(memoryStream);
var bytes = memoryStream.ToArray();
var result = await chatter.PostFeedItemWithAttachmentAsync<FeedItem>(input, bytes, "319051.jpg");
I turned on the system.net diagnostics and can see these headers in my logs.
I am getting the following error:
when I call PostFeedItemWithAttachmentAsync.
Here is my code:
I turned on the system.net diagnostics and can see these headers in my logs.
Content-Type: application/octet-stream
Content-Disposition: form-data; name="feedElementFileUpload"; filename="319051.jpg"
The text was updated successfully, but these errors were encountered: