On Tue, Jul 16, 2013 at 11:09 AM, Robert Newson <[email protected]> wrote:
> Yes, you are ignoring your shell's helpful message :) > > try putting quotes around your url. > > B. > > > On 16 July 2013 16:05, Yves S. Garret <[email protected]> wrote: > > I'm going through this book and I'm in this section: > > http://guide.couchdb.org/editions/1/en/api.html#attachments > > > > I try this in the command line and this is the error that I get: > > % curl -vX PUT > > > http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689--data-binary > > @artwork.jpg -H "Content-Type: image/jpg" > > zsh: no matches found: > > > http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689 > > > > Am I making a stupid copy/paste mistake that's not immediately > > obvious? There is an artwork.jpg in the directory that I'm working > > in. > I have, no luck: % curl -vX PUT " http://127.0.0.1:5984/albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689" --data-binary @artwork.jpg -H "Content-Type: image/jpg" * About to connect() to 127.0.0.1 port 5984 (#0) * Trying 127.0.0.1... * Adding handle: conn: 0x7ff054008c00 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x7ff054008c00) send_pipe: 1, recv_pipe: 0 * Connected to 127.0.0.1 (127.0.0.1) port 5984 (#0) > PUT /albums/6e1295ed6c29495e54cc05947f18c8af/artwork.jpg?rev=2-2739352689 HTTP/1.1 > User-Agent: curl/7.31.0 > Host: 127.0.0.1:5984 > Accept: */* > Content-Type: image/jpg > Content-Length: 15138 > Expect: 100-continue > < HTTP/1.1 100 Continue < HTTP/1.1 409 Conflict * Server CouchDB/1.3.1 (Erlang OTP/R16B01) is not blacklisted < Server: CouchDB/1.3.1 (Erlang OTP/R16B01) < Date: Tue, 16 Jul 2013 15:37:47 GMT < Content-Type: text/plain; charset=utf-8 < Content-Length: 58 < Cache-Control: must-revalidate * HTTP error before end of send, stop sending < {"error":"conflict","reason":"Document update conflict."} * Closing connection 0
