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?
If the chatter post type is :ContentPost
then I need to download that file?

For that How can I implement?

Thanks in advance
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

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