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
SS KarthickSS Karthick 

Downloading Chatter files in visualforce page

Hi folks,
      Can anyone tell me how to download the chatter files in visaulforce page?
like
If the chatter post type is :ContentPost
then I need to download that file?


For that How can I implement?

Thanks in advance
Karthick
NagaNaga (Salesforce Developers) 
Hi Karthick,

You can use the below SOQL query to achieve something similar to this


feedAttachmentList = [SELECT ContentDocument.LatestPublishedVersionId, ContentDocument.title,ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId = :document.Id]

Please find the link below for more info

http://salesforce.stackexchange.com/questions/13571/link-to-download-chatter-file-download-in-vf

Best Regards
Naga Kiran
SS KarthickSS Karthick
@Naga,
         Can you tell me how to get document.Id ?