Managing documents in the Media Library
Documents like .pdf files, Word .doc or .rtf files, Powerpoint files (.ppt) and Excel spreadsheets (.xls), which you want to link to so people can download them from your pages, need to be stored in Site Manager’s Media Library.
Preparing your documents: naming your files
When creating files to upload to the Media Library it is important to follow a few essential naming rules to make them web-friendly. File names that work well on your hard drive can cause technical glitches in Site Manager and usability problems on websites, so you need to follow these naming conventions to avoid issues such as pages and documents failing to transfer from Site Manager to the live site.
- Keep file names as short and as simple as possible: Whilst your file names need to be meaningful, long file names mean long file paths and URLs. If your document’s URL needs to be referenced in print, you need it to be memorable or there is an increased risk of errors when people try to put it into a browser. If you reference long URLs in an email, they are harder to transmit and can break.
- Always check that you have not inadvertently put two dots in your filename, eg ‘myfile..pdf’, as this will cause the transfer of the website from Site Manager to the web server to stall. Any updates to the site are then delayed until the system has been restarted.
- Avoid using spaces between words – and never upload a file with a double space in its name: Double spaces in file names in particular can cause serious problems with the transfer of pages from Site Manager to the live web server, so are best avoided at all costs. Don’t use any spaces at all to avoid this risk, and try to use as few words in a file name as possible to keep things simple.
- Use underscores to separate words in file names, not hyphens: If it is necessary to use more than two words and you feel you need to separate them, then use an underscore as a separator not a hyphen, as Windows might change this to a longer hyphen. This can cause serious problems in Site Manager transfers too, so because of this risk hyphens are best avoided.
NOT OK - ‘my file.pdf’ or ‘my-file.pdf’
OK - ‘myfile.pdf’ or ‘my_file.pdf’
- Use only alphanumeric characters and underscores: Use only letters of the alphabet, numbers and underscores. Use of special characters such as ampersands, question marks, forward or back slashes, percent signs, asterisks, colons, quotation marks, brackets or other punctuation marks can cause problems with files uploading to the website. Letters with accents, such as ‘ç’ or ‘ü’ may also cause system errors, so remove accents if these are present in your file names.
- Try to avoid including dates unless absolutely necessary for file management: Be aware of the risks involved in old files being retained on the web server. When you need to replace an old version with a new updated version of the same document, try to ensure the file you upload to the Media Library has the same filename as the one already on the website - see ‘Version control’ in the guide to ‘Updating existing documents’.
- Avoid adding two files with the same name to the Media Library: T4 may allow you to do this, but the links won’t work properly when the page publishes to the live site.