The goal of this article is to explain in detail how files work in your content management system and how they relate to posts.
Adding a file attachment to a post
When a file is added to the file attachments field of a post a relationship is formed between the post and the file.
When you upload a new file to a post the file is added to the file-attachments folder on the server and assigns it a unique ID in the database; this ID is what you see in brackets for embedding within the content - example: [image:123].
Removing a file attachment from a post
When a file is removed from the file attachments field on a post the file still remains on the server. This behavior prevents broken links on any other posts that may also have a relationship with that file.
Since the file still exists in the file-attachments folder:
-
The file can still be accessed if someone types in the file URL or had previously bookmarked the file URL.
-
Users editing posts can add it to the file attachments field by browsing the file-attachments folder.
Uploading files with the same file name
If you upload a new file to the server and a file on the server has the same file name, the system appends on an underscore and a number - example: _0, _1, _2, etc. Since the file is not replaced the existing file the user is not disrupting any existing post/file relationships. If users do not check to see if the file is already on the server before uploading duplicate files are often created (all with numbers appended to the end). While this doesn’t impact the site’s performance or use, multiple posts referencing duplicate files with similar file names makes replacing a file more tedious.
Replacing a file
If your user account have an Admin role you have access to the Manage Files tab within the Manage Content screen. With this tool you can replace a file while keeping the file ID the same. If you have a file that multiple posts reference, you can replace it easily. This saves you from uploading a new file and updating all the posts to reference the new file.
Removing a file
In some cases you may want to completely remove a file from the server. You can...
-
Submit a support ticket and we can remove the file from the server.
The file will be removed but any posts with links that reference the file will be broken and will need to be updated. -
Replace the file with a file containing the text “This file no longer exists” using the Manage Files tool.
The file’s content is no longer available but any posts with links that reference that file will not be useful to users and will need to be updated. Since the file name and ID doesn’t change, content editors might incorrectly select this file when selecting a file for the file attachments field on their post. Remove the file using the File Browser located in your My Account page. In order to delete a file from the file-attachments folder it can no longer be referenced by any post or post revision. To see which posts reference a file, search for it using the Manage Files tool; the Where Used column will show the posts that reference it. Remove the file from the file-attachments field on the post and delete any revisions that reference the file. Now that no posts or revisions reference the file you can delete it using the File Browser.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article