Surely it's the newlines in the base64 output. B.
On 1 November 2013 11:58, Hank Knight <[email protected]> wrote: > 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.
