Brian Osborne: Introducing the Media Entity File Replace module

The Problem

Replacing files uploaded to your Drupal site can be very frustrating. In most cases, when an editor wants to replace a document, they want to keep the exact same filename and filepath and just overwrite the contents of the file. This is important in cases where the file is linked to elsewhere throughout the website or on other websites outside of the editors control. If you use the media module to manage documents on your site, you’ll quickly discover that it’s not possible to upload a replacement file for a document and keep the same filename.