Much like your images, files are uploaded and associated with content on a one-to-one basis and cannot be reused elsewhere. Your site has lots of room, so if you need to upload the file multiple times, this is the safe and recommended course of action.
You have two methods for adding files:
- Listing at the bottom of the content
How you name your file matters. Of course, you want it to be human-readable, but it's important to remember that shorter is better and, prior to uploading your file, you want to make sure that there are no spaces in the name. If there are spaces in the name, replace them with underscores or hyphens otherwise there's a risk of the link breaking because of the insert of "%20" characters which represent open spaces in the URL.
Original filename: "Student Admissions Numbers for the School 2018-2019 FINAL.docx"
Change to example: "student_admissions_2018-19.docx"
Embedding files into the body of your content
Under most circumstances, you'll want to create a link to a file from within the body of your page. Here is a working example of an embedded PDF of the U.S. Constitution.
- Click on the Insert file icon -
- From the dialogue box that appears, use the Choose File button to locate and select the file you want to upload and use in your content.
- When the file has successfully completed its upload, click the Save button to finish.
Listing files at the bottom of your content
Files will be added to the bottom of your page of content as opposed to being embedded in the body of your text.
- Using your admin panel or navigating through your menu, locate the content type where you want to add your files.
- Click the content type's Edit button.
- Scroll down to the bottom of the content type and look for Documents section.
- Under Add a new file, click on Choose Files.
- Browse your local computer for the file you wish to attach. Allowable file types include:
- Once the file is selected from you system, SiteFarm will present you with a field for entering in a Description for the file. A link to the file will be embedded in your description.
- Scroll to the bottom of the screen and click Save to finish.
- Example of the final output:
Over time you may need to update files and documents included in your site. The process is straightforward;
- Edit your page.
- Locate the embedded link to the file and highlight the link. DO NOT use the Unlink button --that button is for hyperlinks. Instead, use the Insert File icon again .
- A dialogue box will appear listing your most current file with an optional Remove button.
- When the current file has been cleared, you can now use the same dialogue box to upload the new version of the file. Or, if no file is required, click the X in the upper right corner to close the dialogue box.
Permanently deleting files
In general, deleting files is NOT recommended as your content's Revision system relies on the presence of these files to maintain a chronologically accurate view of your content from save point to save point. If you must permanently delete a file, please refer to the documentation on Deleting nodes and files and Fancy File Delete, the latter being the current method available for permanently removing document files from your site.