incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: multipart/related attachments
Date Wed, 14 May 2014 11:49:52 GMT
What error message are you getting back from CouchDB?

On 14 May 2014, at 06:56 , Rian R. Maloney <rian.maloney@yahoo.com> wrote:

> I am trying to PUT a multipart document that contains several images using PHP. I have
managed to base64 encode the images and issue a PUT but I would prefer to do it w/o base 64
encoding. The socket i/o is hanging as if it is expecting a CRLF terminator - which I have
tried many combinations. Here is my log:
> 
> Host: 127.0.0.1
> Authorization: Basic cmlhbjpwYXNzd29yZA==
> Content-Type: multipart/related;boundary="abc123"
> 
> --abc123
> content-type: application/json
> 
> {"body":"This is a body.","_attachments":{"fgs":{"content_type":"text\/plain","follows":"true","length":21},"rgs":{"content_type":"text\/plain","follows":"true","length":20
> 
> --abc123
> 
> this is 21 chars long
> --abc123
> 
> this is 20 chars lon
> --abc123--
> 
> 
> The example in the doc has an extra comma in the json which I assume is an error:
> PUT /test_suite_db/multipart HTTP/1.1 Content-Type: multipart/related;boundary="abc123"
 --abc123 content-type: application/json  {"body":"This is a body.", "_attachments":{  "foo.txt":
{  "follows":true,  "content_type":"text/plain",  "length":21  },  "bar.txt": {  "follows":true,
 "content_type":"text/plain",  "length":20  },                                           
    <- EXTRA COMMA  } }  --abc123  this is 21 chars long --abc123  this is 20 chars lon
--abc123--
> Any ideas would be much appreciated.
> 
> Rian


Mime
View raw message