Documents typically include PDF and XLS files, which are allowed to be stored inside the Media Library as individually uploaded files.
When a document is uploaded into the Media Library, it is then assigned a media library identification number (media ID) and that helps the platform identify and serve that document wherever needed.
For example, you may want to create a Listing Page:
Learn about Listing Pages of Docs
Can you Change the Date for Files uploaded in the Media Library?
You can edit the "Display Date" section within the media edit area of that file if you would like to change the date that appears under the title of that file within the listing page results.
You can edit the "Authored information" section to change the date of the file if you would like for that document to be sorted and searched by a specific year.
Manage documents with ease by uploading directly through the media library for best results. This way if you need to update documents you do not have to do a hunt for any old document links to external outdated documents but when you have the documents uploaded within the media library you can easily update the document in one place and it will populate across the entire site.
Check your Document File name before uploading
Before you upload your file into the media library please make sure you check to see if the file name of that document follows naming convention best practices, here are a few tips to help:
- Length: Keep file names under 31 characters. Long file names can be difficult to remember and can increase the likelihood of error.
- Punctuation: Avoid starting or ending file names with spaces, periods, hyphens, or underscores. Instead, use hyphens to replace spaces and underscores.
- Description: File names should be descriptive and provide enough contextual information.
- Consistency: Use a consistent format to help organize files, avoid duplication, and communicate clearly.
- Date: Use a format like YYYYMMDD to keep files in chronological order. To add a timestamp, use YYYYMMDDThhmm
Example of a good document naming convention:
- Project Name_Document Type_Date: (e.g., "CohortPlan_Schedule_Jan2024")
Never use URL within the Link URL for internal Document linking:
When linking to documents on your site you will always use the name of the document so that the linking tool can find it in the media library and never the "https://-" url of the document because this will lead to an absolute url as well as potential broken links and have a negative impact on your accessibility score.
You will know if you have incorrectly link to an internal document if you see within the dropdown the words "No Results". The "https://-" url is only used for linking to anything that is not within the site, aka external linking.
Example of incorrectly linking to documents inside the media library:
Did you know ServiceNow offers Accessibility Resources and Document Remediation Training?
How to find the Media Library
You can easily find the media library by hovering over Content in the top left corner, then over Media, and select Media library.
How to Link to a Document in the Media Library
You can easily link to a Document by following the same process you use to link to internal pages on the site using the Link tool within the toolbar.
You can just highlight the word you would like to have link to a document and then click the "Link" paperclip icon
Next you will search for the name of the document that you uploaded into the media library within the "Link URL" filed. Remember you can find the "Name" of the document within the "Media Name" field of the media library or within the "Name" field in the edit section of that document media item. Never use the file name in the "File" filed, nor the file url:
Example of where to locate the document name to use for internal linking within the link url field:
When you add the Document media name into the "Link URL" field it will locate it for you within the media library and within the dropdown search results you will see your document under the "Media" bar. You can then select it and click the green check and now you've properly linked to an internal document on your site!
Upload and Embed a Document
You can upload a document to the media library by selecting the content button and then navigating to the "Media" button and with that drop down you will see "Add media" and from there you can easily select "Document" that is with the dropdown list of available media types that can be added to the site media library.
Once you have the document uploaded to the media library you can easily embed it onto a Basic page using the "Document" button within WYSWIG:
From within the "Document Library" section you can search for the document you'd like to embed if the document has already been added to the media library the "Document Library"
If the document has not been uploaded into the media library you can also upload the document from here and it will then save and be added to the media library as well embed within the page you are working on.
How to Update a Document & File Name
To check if the document files that you uploaded within the media library follows the correct naming convention you can first go to the media library and then filter all of the media item types by documents.
If you are viewing the results in the table view then you can select the download button next to the document media item which allows you to easily download that document file for you to see the file name.
You can also select the edit button or the pencil icon for the media item document (depending on your results view being in table or grid) to pull up
This will now bring up the media item edit page where you will scroll down to the "File" field and this is where you will see document file that is added to the media library.
If you see that the document file name in the file field doesn't follow the naming convention best practices you can click the remove button and then the "Choose a File" button will appear for you to upload the document file with the correct file name.
It's important to make sure your document files follow the naming convention guidelines because of the accessibility impact it has.
File naming conventions are important for screen readers, web pages and directories, as well as for downloadable files such as PDFs, Word documents, and Excel spreadsheets.