couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hank Knight <hknight...@gmail.com>
Subject CouchDB: Large inline attachments using cURL or wget
Date Fri, 01 Nov 2013 11:58:19 GMT
I am trying to add an inline attachment using either cURL or wget.

My method works if the attachment is only a few words long however if
it is larger it fails.  I have attached the file to this email.

I get multiple errors like this:
curl: (6) Couldn't resolve host
'bCwgdmVzdGlidWx1bSB2aXRhZSBlZ2VzdGFzIHNpdCBhbWV0LCBpbXBlcmRpZXQg'

curl -X POST http://zurv3aqzm.iriscouch.com/zzz -d '{"xyz":"Hello
World", "_attachments":{"foo.txt":{"content_type":"text\/plain","data":
"'$(openssl base64 < xyz.txt)'"}}}' --data-binary -H "Content-Type:
application/json"

wget -S \
  --header "Content-type:application/json" \
  -O - \
  --post-data '{"xyz":"Hello World",
"_attachments":{"foo.txt":{"content_type":"text\/plain","data":
"'$(base64 < zzz.txt)'"}}}'  \
  http://pbgimages.iriscouch.com/zzz

Any idea what I should do?

Thanks.

Mime
View raw message