incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slymak <sly...@gmail.com>
Subject upload file via curl
Date Fri, 17 Sep 2010 14:13:41 GMT
Hello,
I'm new on this mailing list if my question was solved here before please
write me a link there, I didn't find it using search.

I want upload files via bash.
I'm able now select file names and store that as keys
+ insert fields name, date
______________________________________________________________
#!/bin/sh
IDATE=$(date +%Y:%m:%d)

curl -X DELETE http://localhost:5984/test
curl -X PUT    http://localhost:5984/test

for FILE in `ls jcl/*`; do
sfile=`echo $FILE | sed -e 's/jcl\///'`
curl -X PUT http://localhost:5984/test/$sfile -d  '{"name":"'$sfile'",
"date":"'$IDATE'"}'

#"@jcl/"$sfile
done
_____________________________________________________________

how to include attachment into cURL?

my files are in jcl directories should stay for upload here:
/usr/share/couchdb/www/jcl/
?

thank you for advance
Fanda

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message