Documents and the Media Library
Documents are stored in the Media Library on Sitecore.
The best time to upload a document is before you add a link to it, so that the document is already uploaded and ready to add in when working on the relevant page/component.
Make sure you use documents in the correct file format, details about this are below.
To begin uploading your document you will need to open the Media Library:
Accessing the Media Library
To get to the Media Library, open the main start page for Sitecore. Then click on the icon with an image named 'Media Library'. This can be done at any point in time, even if you have Content Editor or Experience Editor open in a different tab or window.
Navigating the Media Library
The Media Library has a similar set up to Content Editor - there is a left-hand menu with expandable folders which reflects the structure of the website.
We store all our images and documents in the 'UWE' folder and then either 'Images' or 'Documents' depending on the file type.
These folders are organised in the same way as the components folders, so there are subfolders with the main website sections such as 'Life' and 'Study'. This is where you will need to upload your document, so navigate to the relevant subfolder and select it.
Eg. A document which will be linked to and downloadable from the Sustainability landing page will sit within the 'About' folder because the URL is uwe.ac.uk/about/values-vision-strategy/sustainability/.
Sometimes there are further subfolders, so check for these as well, for example there is a policies folder within 'About'.
Naming and saving documents on your computer
The document file name should reflect the title of the document. Naming needs to be logical so that documents can be found using the search function.
Document files need to be named according to their title with hyphens separating words (no spaces and no special characters). Remove random numbers, underscores and other information that is not needed.
Rename your document when you are downloading it, so it is stored correctly on your computer before uploading to Sitecore.
Take a look at existing examples of documents in the Media Library if you're unsure of how to name yours.
Please note that documents need to be PDFs unless they need to be editable by users (eg. forms), in which case we use Word Document files.
If you are given a Word Doc please export and save it as a PDF before uploading, unless it needs to be editable.
Like images, documents have their own dedicated subfolder in the Media Library. You can find this under the folder UWE > Documents.
Save your document in the relevant sub-folder according to the section of the website it will be linked from. Sometimes there are sub-folders within sub-folders so make sure to drill down and check.
Once you are in the correct folder, use the upload button as you would for an image.
Then once you have chosen 'Upload file', navigate to the correct document on your computer and upload it.
Remember to publish your document too while you are there.
Once this is done you can link to the document from your web page or component using a copy section.
Replacing or updating documents
Rather than uploading a new version each time we receive an amended document that has already been published to the website, we try to replace/overwrite the document with the new one in the Media Library.
To do this, first check the name of the document on the page you are working on by hovering over the link, or opening the link in a new window. This will show you the URL for the document (ie. the file path in the Media Library). You can use this information to then locate the document in the Media Library either by navigating the menu or using the search function.
Once you have found the old document in the Media Library, use the 'Detach' link under the 'Media' section to remove the old document and the 'Attach' link to upload the new version. Ensure the file names are different when uploading otherwise Sitecore may not overwrite the file. Then save and publish your changes. Sitecore will tell you when you publish the document if it has been successfully updated as there will be a message reading 'items updated: 1'.