Zoph Bulk import not working

Problem Description
I installed Zoph, and I can import photos one at a time, but I can’t figure out the bulk import. When I try to import, nothing happens. I’m running Freedombox on an old Acer netbook with 160Gb hard drive

Steps to Reproduce

  1. I used Syncthing to move pictures from my laptop to the Acer folder: /var/lib/syncthing/ShareFolder
  2. Start Zoph and go to the import tab. Under the import section, I set the path to /var/lib/syncthing/ShareFolder
  3. I don’t choose any other option, I just click “import”.
  4. Nothing happens.
    Expected Results
    I expected the photos to appear in Zoph

Actual results
nothing happens. No errors.

I was not able to accomplish this from the GUI either, but I was able to do it on the command line.

Here’s a snippet from the Zoph documentation:

example

Let’s say you have a bunch of photos plus a text file in a directory:

zoph@zoph $ ls IMG_1203.JPG IMG_1207.JPG IMG_1211.JPG IMG_1215.JPG IMG_1219.JPG IMG_1204.JPG IMG_1208.JPG IMG_1212.JPG IMG_1216.JPG IMG_1220.JPG IMG_1205.JPG IMG_1209.JPG IMG_1213.JPG IMG_1217.JPG IMG_1221.JPG IMG_1206.JPG IMG_1210.JPG IMG_1214.JPG IMG_1218.JPG photos.txt

If you want to import all photos, you could do

zoph@zoph $ zoph *

However, this will cause an error when zoph tries to import a textfile, so it’s better to do:

zoph@zoph $ zoph *.JPG

Or even

zoph@zoph $ zoph IMG_12*.JPG

More here: Zoph/Using the commandline tools - Wikibooks, open books for an open world

Ok, let me try that. I assume I should put the photos in a directory on the server where zoph resides.

thank you!

Ok, I tried that - it failed several times, but then it worked -here’s how I did it:

  1. I set up a syncthing folder and sent the photos to that folder.
  2. I navigated to that folder on the server via command line
  3. I typed sudo zoph *.jpg (it failed when I left off the sudo :slight_smile: )

it is still not adding photos to categories or albums, but that is a separate issue at this point.

Let’s close this as resolved by using the CLI

It has been a while, but I think I recall the permissions being not quite right out of the gate in my zoph folder. If system (root) owns the folder that would explain why you are having to elevate to move stuff to the folder.

To fix the ownership:

sudo chown -R mudflap:mudflap /path/to/zoph

Where “mudflap” is your username on the box and “/path/to/zoph” is (obviously) the path to the folder.

1 Like

To use the zoph cli you should be a member of the zoph group, as this provides direct access to the zoph database and all the photos. It is designed to have multiple users and for different zoph users to have permissions to read or write different zoph albums.

Bulk import via the web interface for individual photos is a feature of zoph-0.9.19, which will need to go into Freedombox via Debian Backports as it came out after bullseye was released. It is on my todo list.

For bulk imports on zoph 0.9.16, I make a tar or zip file of the photos (not too many at once due to PHP upload limits), and import the .tar file

They will then be unpacked by the uploader and can them be imported into zoph albums.

Note that the web uploader directory refers to files on the computer you are running on, not files on the freedombox server, as it is doing a standard HTTP upload, as you might do uploading files to any server where you do not have access to the system, such as Dropbox, or similar file sharing systems.

2 Likes