Would this flow work with Immich & Syncthing to copy images and auto upload and delete? - eviltoast

I would like new images to be uploaded to Immich from my phone and deleted after 30 days automatically, so I was thinking about this flow:

  1. I will Sync files to the server using Syncthing

  2. I will Copy files from the Synced folder to an Immich Consume folder, (not sure how to copy only new files (maybe use created date)). Then delete images that are older than 30 days which will remove them from my phone.

  3. I will upload to Immich using Immich CLI (?) which will use the delete after upload flag.

Basically:  

(1)

Camera, Screenshots, etc =Syncthing=> SyncthingImageConsume/{Folder}

(2)

{Script on SyncthingImageConsume}

SyncthingImageConsume/{Folder} =CopyNewFiles=> ImmichConsume/{Folder}

Then delete older than 30 days.

(3)

{Script on ImmichConsume}

Upload to immich and then delete

 

would this work? and is there a better way to do it? any tips?

  • couch1potato@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 months ago

    Sure… I’m on unraid…

    cd /mnt/user/appdata_docker/immich/immich-go
    ./immich-go -server=http://192.168.20.1:8080 -key=IMMICH_API_KEY upload -create-album-folder -when-no-date=FILE /mnt/user/photo_libraries```
    
    
    ![](https://lemmy.dbzer0.com/pictrs/image/5155dc7f-1545-4e07-b7ec-4721e5fec43a.jpeg)
    
    
    There are other flag arguments that may be applicable to your use case... I'd suggest finding immich-go documentation on github and reading. It's not that intense of a read.