File Card
lightning:fileCard
Displays a preview of an uploaded file available in Salesforce CRM Content or Salesforce Files. For Aura components only.
For Use In
Lightning Experience, Experience Builder Sites, Salesforce Mobile App
A lightning:fileCard component displays a preview of a file. On desktops, clicking the file preview opens the SVG file preview player, enabling you to preview images, documents, and other files in the browser. The file preview player provides quick access to file actions, such as upload, delete, download, and share. On mobile devices, clicking the file preview downloads the file. Descriptions are visible in the file preview unless the hideDescription attribute is true. The file type determines the icon used on the file preview and caption area.
This component implements styling from files in the Lightning Design System.
Here's an example of a file preview. The fileId value must be a valid 15 character ContentDocument ID.
Opening the file preview player is supported in Lightning Experience, the Salesforce mobile app, and Experience Builder sites.