Damselfly icon indicating copy to clipboard operation
Damselfly copied to clipboard

Support multiple top-level/content folders with user roles/access

Open Webreaper opened this issue 4 years ago • 5 comments

Might be nice to allow multiple mounts in Docker so that more than one root folder can be added. This would probably require:

  1. Setup / config with a browser where you select folders you want to index
  2. Folder/role associations (or folder/user associations)

So that user1 could access folder1 and folder2, and user2 could access folder2 and folder3.

Webreaper avatar Sep 06 '21 12:09 Webreaper

Mutliple directories (in Docker) for /pictures would be useful. I am bolting this on to NextCloud which has a photos directory and an InstantUploads directory, for automated device syncing, which are in the top level directory. It would be nice to index both.

m!

sawasy avatar Nov 15 '21 09:11 sawasy

The best way to do this right now would be to create a third folder, point Damselfly at that, and put two symlinks in so you have two subfolders, one for photos and one for InstantUploads.

Webreaper avatar Nov 15 '21 09:11 Webreaper

I got this hack to work, but there is a bit of a sharp corner. You must define the underlying volume in docker-compose.yaml.

      - /var/www/nextcloud/data/<USERID>/files/damselfly:/pictures
      - /var/www/nextcloud/data/<USERID>/files:/var/www/nextcloud/data/<USERID>/files

As the symlinks won't be able to travers the full or relative path provided by the symlink.

Not a huge deal, but it took a min of head scratching.

Thanks for the idea!

m!

sawasy avatar Nov 15 '21 09:11 sawasy

I'm in the same boat as sawasy. I created a symlink for my nextcloud InstandUploads directory into my top level Damselfly directory. Damselfly is not seeing the symlink listed. Did the following to create and verify that the symlink is in the directory:

root@RHVH01:~# ln -s /mnt/user/appdata/nextcloud/brichards/files/InstantUpload/Camera /mnt/user/Media/Pictures root@RHVH01:/mnt/user/Media/Pictures# ls 2010/ 2011/ 2013/ 2014/ 2015/ 2016/ 2017/ 2018/ 2019/ Camera@ To\ print/ ben_phone/

Edit: To clarify, the top level Damselfly directory is /mnt/user/Media/Pictures

Edit 2: Tried to navigate to the symlink from the docker CLI and this is what I get: pwd /pictures

ls 2010 2011 2013 2014 2015 2016 2017 2018 2019 Camera 'To print' ben_phone

cd Camera sh: 54: cd: can't cd to Camera

bericha avatar Apr 20 '22 21:04 bericha

Windows

SymLinks

In a PowerShell with Administrator privilege run the following:

New-Item -ItemType Junction -Path "g-assets" -Target "g:\Assets"`

docker-compose

Use something like this for the docker-compose.yaml: It may be a terrible idea to map the roots of the drives but it saved a lot of typing for me.

version: "3"
services:
  damselfly:
    container_name: damselfly
    image: webreaper/damselfly
    ports:
      - "6363:6363/tcp"
    volumes:
      - "G:/docker-storage/damselfly:/config"
      - "G:/docker-storage/damselfly/thumbs:/thumbs"
      - "G:/docker-storage/damselfly/dir_links:/pictures"
      - "C:/:/mnt/host/c"
      - "G:/:/mnt/host/g"
    restart: unless-stopped

lightbender255 avatar Aug 15 '23 08:08 lightbender255