immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
33.2k stars 1.6k forks source link

Prevent reuploading deleted files from Mobile App #8285

Open xeonixo opened 1 month ago

xeonixo commented 1 month ago

The bug

I currently have the following problem - me and my girlfriend synchronize to the same account from our iPhones. When I try to delete the immich photos because of duplicates, the pictures are always synchronized again. Is there any way to prevent the immich app on the smartphone from trying to upload everything in the first place? I imagine it to be like a "fobidden list" for SHA's or unique IDs. The Duplicate-Detection wont work because of different file names or types for the same image.

The OS that Immich Server is running on

Debain 12

Version of Immich Server

v1.99.0

Version of Immich Mobile App

v1.99.0

Platform with the issue

Your docker-compose.yml content

version: '3.8'
name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always
    networks:
      caddy:
        ipv4_address: 172.18.0.10
  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    #   file: hwaccel.transcoding.yml
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always
    networks:
      caddy:
        ipv4_address: 172.18.0.11

  immich-machine-learning:
    container_name: immich_machine_learning
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    #   file: hwaccel.ml.yml
    #   service: cpu
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    networks:
      caddy:
        ipv4_address: 172.18.0.12
  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always
    networks:
      caddy:
        ipv4_address: 172.18.0.15
  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always
    networks:
      caddy:
        ipv4_address: 172.18.0.13
  immich-duplicate-browser:
    container_name: immich-duplicate-browser
    image: ghcr.io/agross/immich-duplicates-browser:latest
    environment:
      - IMMICH_URL=https://(redacted)
    networks:
      caddy:
        ipv4_address: 172.18.0.14
networks:
  caddy:
    external: true
volumes:
  pgdata:
  model-cache:

Your .env content

UPLOAD_LOCATION=./library
IMMICH_VERSION=release
DB_PASSWORD=(redacted)
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Sync with Mobile App
2. Delete File from immich - remove from trash
3. Sync again with Mobile App
4. Files are Back inside the immich

Additional information

No response

JW-CH commented 1 month ago

Delete File from immich - remove from trash

I assume you delete them in web, not on mobile right?

xeonixo commented 1 month ago

I assume you delete them in web, not on mobile right?

Yes, I am deleting in Web or via API.

Does it make a difference to delete inside the app?

Mostly I want to get rid of screenshots and some useless shots from work wich are needed on the phone but are useless on my Immich instance.

alextran1502 commented 1 month ago

We have yet to build a mechanism to not letting you reupload files that have been removed from the web yet

xeonixo commented 1 month ago

We have yet to build a mechanism to not letting you reupload files that have been removed from the web yet

Is that on any agenda for the next time?

alextran1502 commented 1 month ago

We have yet to build a mechanism to not letting you reupload files that have been removed from the web yet

Is that on any agenda for the next time?

No there is not

davidwaze commented 1 month ago

Hello,

I must admit this is very annoying for me too with same expectations.

There should be an option into the smartphone app as a first step to upload pictures once only (instead of having a full picture id's database). It shouldn't be too difficult right ?

When I want to do a picture cleanup into the common library and uploaded by somebody else than me. I need to identify which picture has been uploaded by who (we are using the same account to keep face recognition and so on). This is driving me insane 🤯.

My only workaround, but I don't like it, is I'm currently having a tasker scenario for my Android smartphones removing pictures older than 1 week. So I know when I deleting from my smartphone or through the web app something older thant 1 week, pictures won't be uploaded again accidentally.

Thanks again for your support.