immich icon indicating copy to clipboard operation
immich copied to clipboard

[Feature] Prevent duplicate photos while logged in from two devices

Open hyperstown opened this issue 2 years ago • 6 comments

Feature detail When user uses one account on two different phones and both devices have same photo, app doesn't recognize that photo from one device has already been uploaded and uploads it from both phones creating duplicate. It's rather undesired behavior since I'd like to have some photos on both phone while keeping one backup. I did quick sha256sum check and both photos have exactly the same hash.

How it works now Steps to reproduce the behavior:

  1. Create account
  2. Log in and enable backup on phone 1
  3. Log in and enable backup on phone 2
  4. Download some photo from the Internet on phone 1 then on phone 2 (Photos from both are uploaded as unique files)

Expected behavior A photo has been uploaded from device 1. So it doesn't uploads again from device 2

hyperstown avatar Jul 30 '22 17:07 hyperstown

This is not a bug, there is no mechanism for deduplication on the server yet. As long as the photo/video is backed up from different devices, it will be treated as a unique file.

Deduplication on the server side is on the roadmap and will be worked on

alextran1502 avatar Jul 30 '22 17:07 alextran1502

Thanks for fast reply. I'll change it to feature request then. Is that ok?

hyperstown avatar Jul 30 '22 18:07 hyperstown

Yes, that should be fine. Thank you

alextran1502 avatar Jul 30 '22 18:07 alextran1502

Small rephrasing: done! As for labels I don't have permissions.

hyperstown avatar Jul 30 '22 18:07 hyperstown

@alextran1502 since you save the filename to the database, it should be easy. We just need to add an API Endpoint to check if the data exists. Then we must update the uploader (mobil/web/cli) to check the endpoint instead of the server folder for existing images.

MalteKiefer avatar Aug 04 '22 11:08 MalteKiefer

Same as my 2 previous issues for me ... using name is not safe ...

https://github.com/immich-app/immich/issues/248 https://github.com/immich-app/immich/issues/185

Nonobis avatar Aug 04 '22 13:08 Nonobis