Skip to content

Instantly share code, notes, and snippets.

@photo
Created October 9, 2011 19:39
Show Gist options
  • Select an option

  • Save photo/1274061 to your computer and use it in GitHub Desktop.

Select an option

Save photo/1274061 to your computer and use it in GitHub Desktop.
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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

jdeproost commented Oct 11, 2011 via email

@tommyla
Copy link
Copy Markdown

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"

@olberger
Copy link
Copy Markdown

@Bunchheang
Copy link
Copy Markdown

I like this www.qoosi.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment