For emails, links to files need to be set as full URLS using the standard hyperlink manager (rather than Sitecore links). If a file is only linked to from an email, you need to publish the file, then test and link to the full URL of the hosted file in your email.
File Already Hosted on the Website
If the file is linked to from a website page, you can add a link to the file to the website page and publish the link to the live website. Then, click on the link to the file on the website page. The file will be displayed in your web browser and you can copy that URL for use when creating a hyperlink in your email to the file. Or, you can temporarily add link to a file to a live website page to get the URL to the PDF, and then remove it.**
How-to Create a Link to a File Hosted in the Media Library
If the PDF is hosted on a live website page you can simply click on the link and use that URL as a hyperlink in your email. Otherwise, you can follow these steps:
- Ensure you file meets our file naming and if a PDF the PDF accessibility standards.
- If needed, rename the file so that it meets the file naming conventions for PDFs.
- Then, add the basic accessibility settings to your PDF.
- Upload the PDF into the correct folder media library in Sitecore [e.g. Email > Unit > YYYY > MM].
- Publish the media library item (Email Builder: Publishing Media Library Items).
- With the image selected click the "WSOB" tab and then click "Publish Media Item".
- You'll now be able to link to the item for the email recipient to download, similar to how other hyperlinks are set up in an email.
- To confirm the publish/hosted version of the file's URL perform the following actions:
- In a new tab in your browser add https://bus.wisc.edu/-/media/
- Then, copy and paste the item path to the end of the URL. [https://bus.wisc.edu/-/media//sitecore/media library/email/branding-insights/2018/11/wisconsin-ar-infographic-alumni-panel]
- Remove /sitecore/media library/ and add the file extension (e.g. .pdf) to the end of the URL. [https://bus.wisc.edu/-/media/email/branding-insights/2018/11/wisconsin-ar-infographic-alumni-panel.pdf]
- Hit enter.
- Test the link and then use it as a hyperlink in your email.
- Use the URL as the link to the file in any hyperlinks or buttons in your email.