incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Can't upload a pic to CouchDB.
Date Tue, 16 Jul 2013 17:12:15 GMT
You need to pass the current rev, which clearly doesn't match the one
you tried and got the 409 conflict telling you it was wrong for.

On 16 July 2013 18:07, Yves S. Garret <yoursurrogategod@gmail.com> wrote:
> On Tue, Jul 16, 2013 at 11:39 AM, Yves S. Garret
> <yoursurrogategod@gmail.com> wrote:
>>
>> On Tue, Jul 16, 2013 at 11:13 AM, Tim Tisdall <tisdall@gmail.com> wrote:
>>>
>>> Do you have a space before "--data-binary" when you run the command?
>>>
>>>
>>> On Tue, Jul 16, 2013 at 11:05 AM, Yves S. Garret
>>> <yoursurrogategod@gmail.com
>>> > 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.
>>> >
>>
>>
>> Yes.
>
>
> This is what's in the database at the moment (if it helps):
>
> {
>    "_id": "6e1295ed6c29495e54cc05947f18c8af",
>    "_rev": "1-4b39c2971c9ad54cb37e08fa02fec636",
>    "title": "There is Nothing Left to Lose",
>    "artist": "Foo Fighters"
> }
>
>
> And I've attached the file with the actual DB.

Mime
View raw message