Replacing Files

You will first need to be logged in via the user page. For example, the following link would be used on this site:

To update files on the website you will need to navigate to a different area of the website itself:

To Replace a Document

Navigate to the Media tab, and find the file you want to replace. You can search by ‘Media Name’ or scroll the list to find it. Once found, click on the “Edit” button on the right-hand side:

Drupal 8 screenshot demonstrating the viewing and editing of files within the media tab

Once you have clicked “Edit” it will bring you to a similar screen as the “Add”.

Click the “Remove” button, then “Choose File” to add a new file which will replace it.

When done, hit "Save":

Drupal 8 screenshot demonstrating how to remove a file before replacing.

Your content is now ready to be linked anywhere on the website.

File Replace (D8)

The file replace module is a small utility providing site administrators with the possibility to replace files, keeping the file uri intact. This is useful in cases where a file is linked or used directly but needs to be updated occasionally.

Installation and usage

Install the module as you would any contrib module, preferably with composer:

composer require drupal/file_replace

The module currently only provides a 'Replace' page for files. You will need to manually add links to the file overview page. Simply adding a global text field with a link like the following would work fine:

admin/content/files/replace/{{ fid }}

Drupal 8 screenshot demonstrating the File Replace module