File Download
lightning/fileDownload
Download a file in an LWR site in Experience Cloud.
For Use In
Experience Builder Sites
Add file downloads to Experience Cloud sites that use the Build Your Own (LWR) template.
To create a component that downloads a file, import generateUrl from lightning/fileDownload. Use the generateUrl function and pass in the record ID number of the files that you want to download. This function supports Content Document, Content Version, Attachment, or Document record IDs.
For this module’s documentation, see the Lightning Web Components Developer Guide.