Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upload all photos from a directory using command line (openphoto-php - https://github.com/openphoto/openphoto-php)
#!/bin/sh
source secrets.sh
for i in $(ls /path/to/directory/*.JPG) ; do
./openphoto -h yourhost -e /photo/upload.json -F "photo=@$i" -X POST;
done
@jdeproost

This comment has been minimized.

Copy link

jdeproost commented Oct 10, 2011

This is great, but would it be possible to add tags optionally at the same time? So all the uploaded photos are linked with the provided tags?

@jmathai

This comment has been minimized.

Copy link

jmathai commented Oct 10, 2011

Just add tags as another parameter

./openphoto -h yourhost -e /photo/upload.json -F "photo=@$i" -X POST -F "tags=tag1,tag2";
@jdeproost

This comment has been minimized.

Copy link

jdeproost commented Oct 11, 2011

@tommyla

This comment has been minimized.

Copy link

tommyla commented Sep 12, 2012

use folders as tags and albums

so if you have a
"Vacation 2012" folder
then it will be album "Vacation 2012" and all pictures inside it has the tags "Vacation,2012"

@Bunchheang

This comment has been minimized.

Copy link

Bunchheang commented Feb 19, 2016

I like this www.qoosi.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.