function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saikishore Reddy AengareddySaikishore Reddy Aengareddy 

Copying attachment to chatter feed, preview not working

Hello All,

Once an attachment is inserted I am inserting it to chatter feed(Feeditem) but for some reason the content type is not getting set on feeditem. The attachment has appropriate contenttype that is being used to post to chatter feed. Content type on feed item is not writable so I am not able to set content type explicitly. Any help on this would be greately appreciated. 
Andy BoettcherAndy Boettcher
The DML Insert action of an attachment to the FeedItem automatically determines the MIME type if the file you upload is of a valid MIME type.