Hi. While trying to upload an attachment using curl I get the following: curl -vX PUT http://user:[email protected]:5984/albums/6e1295ed6c29495e54cc05947f18c8af/img.jpg?rev=32-f32a6d93b0f9483c4580adb5e0075fe4 --data-binary @img.jpg -H "Content-Type: image/jpeg"
* STATE: INIT => CONNECT handle 0x600091250; line 1402 (connection #-5000) * Added connection 0. The cache now contains 1 members * Trying 127.0.0.1... * STATE: CONNECT => WAITCONNECT handle 0x600091250; line 1455 (connection #0) * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0) * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600091250; line 1562 (connection #0) * STATE: SENDPROTOCONNECT => DO handle 0x600091250; line 1580 (connection #0) * Server auth using Basic with user 'jlb333333' > PUT /albums/6e1295ed6c29495e54cc05947f18c8af/img.jpg?rev=32-f32a6d93b0f9483c4580adb5e0075fe4 HTTP/1.1 > Host: 127.0.0.1:5984 > Authorization: Basic amxiMzMzMzMzOk50WmwuNkR3 > User-Agent: curl/7.49.0 > Accept: */* > Content-Length: 4 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 4 out of 4 bytes * STATE: DO => DO_DONE handle 0x600091250; line 1659 (connection #0) * STATE: DO_DONE => WAITPERFORM handle 0x600091250; line 1786 (connection #0) * STATE: WAITPERFORM => PERFORM handle 0x600091250; line 1796 (connection #0) * HTTP 1.1 or later with persistent connection, pipelining supported < HTTP/1.1 201 Created < Cache-Control: must-revalidate < Content-Length: 96 < Content-Type: application/json < Date: Thu, 12 Jan 2017 02:29:25 GMT < Location: http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/img.jpg * Server CouchDB/2.0.0 (Erlang OTP/17) is not blacklisted < Server: CouchDB/2.0.0 (Erlang OTP/17) < X-Couch-Request-ID: 7d9cc02465 < X-CouchDB-Body-Time: 0 < {"ok":true,"id":"6e1295ed6c29495e54cc05947f18c8af","rev":"33-47753389b1d0b6d6427a4c018a4d0604"} * STATE: PERFORM => DONE handle 0x600091250; line 1955 (connection #0) * multi_done * Connection #0 to host 127.0.0.1 left intact * Expire cleared The actual file size is 66518 bytes. If I upload the same file using fauxton, it uploads correctly. ("IMG.jpg": { "content_type": "image/jpeg", "revpos": 24, "digest": "md5-jlDEFsvG0rz0KJMMaWIfSQ==", "length": 66518, "stub": true) I have tried different spelling(Content-Type: image/jpg) and putting in/removing quotation marks around http.... eg 'http... and "http... John Le Brasseur
