The Merge Duplicate Files (MDF) module extend filehash module functionally and allow to reuse uploaded files automatically if user upload the existed file. Module compare files by hash and prevent duplicate files, replace it with exists file.

HOW ITS WORK

After uploading files in your entity edit form (eg. node edit form or taxonomy term edit form) and submit it MDF module check next criteria:

  1. Uploaded file duplicate not exists (not found hash matches): module does nothing.
  2. Uploaded file duplicate found on other fields on current entity or fields in other entity types: module delete new uploaded file and attach founded duplicate file instead of delete new file.
  3. Uploaded file duplicate found multiple value field: module deletes duplicate files and leaves only one first file.

REQUIREMENTS

This module requires the following modules:

INSTALLATION

Install as you would normally install a contributed Drupal module. Visit installing modules page for further information.

CONFIGURATION

  • Configure the user permissions in Administration » People » Permissions:
    - administer mdf module
    • Allow permitted users to access and change MDF module configuration.
  • Set allowed hash algorithms on filehash module settings page.
    Goto admin/config/media/filehash page and enable one opr more algorithms.
    Uncheck "Disallow duplicate files" if checked.
  • Generate hashes for exists files.
    Goto admin/config/media/filehash/bulk and click "Bulk generate file hashes" button.
  • Goto /admin/config/media/mdf and select the comparison algorithm and the types of entities for which you want to perform checks.
Supporting organizations: 

Project information

Releases