Was wondering if anyone has figured out how to integrate the File Preview (for PDFs, jpgs etc.) that is present in the standard Files Related List into Lightning Data Table? i found this link that can open a preview "/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=0688E0000008paMQAQ" but its not in the same in functionality and layout (ie. doesnt have the Download, Share etc. links). I've seen some uses of lightning:fileCard but not within Lightning Datatable


Create a row action in data table and launch slds modal opener where you can use lightning:fileCard base component to preview a file.

  • Was able to get it to work with this setup, much appreciated. Any ideas on how to autolaunch the Lightning:filecard component (ie. just have the file preview automatically open when the Modal is launched rather than the user click again)? Been stuck on that – Bobbygllh Mar 8 at 20:53
  • try with lightning:openFiles – user57371 Mar 9 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.