Skip to content

Do not store downloaded file if it is already attached #6197

Closed
@koppor

Description

@koppor

Follow-up to #6174

When a user downloads a PDF - and this PDF equals to an already attached PDF, it should not be attached again.

Possible steps:

  1. default.pdf exists
  2. Download as default (1).pdf.
  3. Check if file content of default.pdf equals file content of default (1).pdf (Use https://guava.dev/releases/21.0/api/docs/com/google/common/io/Files.html#equal-java.io.File-java.io.File-)
  4. If it is equal, just delete default (1).pdf. Show notification that already linked. Finish.
  5. If not equal, add to linked files.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions