Option for missing information

Created on 8 December 2024, 5 months ago

When a media item is detected as a duplicate by this module, notifying and preventing it from being uploaded - does it currently take into account any other fields?

For example, if an existing image had no values for geolocation, filesize, or other metadata - either that data wasn't extracted or was deleted and unavailable on the image uploaded - but a detected duplicate attempting to be uploaded did have that metadata... is there any way to detect that missing information and notify the user, possibly with an option to "merge conflict resolution" any metadata discrepancies.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @w01f
  • πŸ‡ΊπŸ‡ΈUnited States w01f
  • πŸ‡¦πŸ‡ΊAustralia nterbogt

    The plugin system that does the duplicate detection takes the entire Media object. You'd be able to write a comparison plugin that addresses your needs and use that instead of the default.

    At that point, the standard duplicate detection response would kick in. It doesn't give you all the options in your issue, but it does tell you which media item is conflicting, so you can go an update it if required.

    Does this solve your issue?

  • πŸ‡ΊπŸ‡ΈUnited States w01f

    I'm not sure. Here's a better specific use case scenario.

    1. A user takes a picture of themselves on a mountain. The image has geolocation data by default.
    2. The user uploads the picture to a private or cloud storage that strips metadata.
    3. The user then uploads the photo from their storage to their Drupal site. This image has no geolocation data.
    4. The user then decides they want to create a map for the pictures that relies on the geolocation data, so they re-upload the originals directly from their camera.
    5. The duplicates module detects the images are the same.

    In this case would it in fact detect them as the same, or would the missing metadata make them unique to the module?

  • πŸ‡¦πŸ‡ΊAustralia nterbogt

    Out of the box they would be considered duplicates. But you can write your own plugin that would take into account both the file hash, and the geolocation data.

Production build 0.71.5 2024