Embedding a file link
- Go to the page where you want to add a link to a file
- Click the Edit tab
- Place the cursor in a rich text field (e.g. the Body field) where you wish to add the link to the file
- Click the Embed File button
- You can select an existing file that has been previously uploaded under the Library tab
- OR You can add a new file under the Upload New File tab. The allowed file types include csv, dat, doc/docx, fodg, fodp, fods, fodt, key, odf, odg, odp, ods, odt, pdf, ppt/pptx, rtf, txt, and xls/xlsx.
- Provide a name, and click Browse to upload your file from your local hard drive
- Click Save File, then click Next, then click Embed
- The link will now be embedded in your page using the name you specified:
- Save the change to the page by clicking Save
Editing an existing embedded file
- Edit the page with the existing embedded file
- Click to select the file you wish to edit, then click Edit button which will be located in a menu above or below the selected file.
- In the Embed media item dialog, you will see a link to the media item entity
- Click on the link to the file, which will open the file entity in a new window.
- Click the Edit tab or button to edit the file entity
- If you need to change the name, do so in the Name field
- If you need to replace the file, upload the new or updated file in the Replace file field. In order to ensure that any links to the file remain valid, leave the Overwrite original file checkbox selected.
- Save the change to the file entity by clicking Save
- You can now close your window and exit the editing interface. Your changes will automatically appear anywhere that this file entity is embedded.
Alternatively, you can select Content > Media from the admin toolbar, where you can search all media items. Locate and select the file you wish to edit, then start at Step 5 above.
Linking to a file in a block of text
- Follow the instructions above for either adding a new file and browsing for an existing file.
- When viewing the file entities that are in the library, you will see a small blue button labeled Link next to the file name
- Right-click on that button and copy the direct link to the file.
-
Go back to editing your page, select the text that you would like to link to the file, click the Link icon and paste the URL that you copied into the URL field, append the file type (pdf, doc, xls, etc.) and file size (e.g. 2 MB) to the Display Text field, then click OK. The link should look like this:
Download the Sample Word Document (docx - 1 MB)It is very important to specify the file type and size after your link to meet the web accessibility requirements that Duke is obligated to follow. Without this information, persons using a screen reader will not know that the link is to a file download, resulting in a confusing experience. Providing this information also allows all users to avoid unnecessary downloads, which is eco-responsible (green) best practice.