Hi Justin,
The curl command would look something like this for uploading an image:
curl -v -H "Content-Type: image/gif" -T test.gif
http://localhost:5984/test/_design/test/test.gif?rev=3681538178
Jason
On 30 Dec 2008, at 17:09, Justin Walgran wrote:
I was using Futon through Firefox 3.0.5 to upload the attachments.
I tried curl and it does work! :)
The mime type of the file is "application/x-www-form-urlencoded" when
it hits couch, so I need to figure out how to properly PUT the binary
file, but it looks like the plumbing is working. Thanks so much!
Can anyone reply with the proper arguments I should pass to curl in
order to PUT a binary attachment? Thanks.
-Justin
On Tue, Dec 30, 2008 at 10:41 AM, Jason Davies
<[email protected]> wrote:
On 30 Dec 2008, at 14:16, Justin Walgran wrote:
I do see that my design documents now show without %2F (awesome)
_but_
I still have the same issue. When I upload a file named
"images/pickle.gif" it gets attached as "images:pickle.gif" and can
only be retrieved by requesting "_design/doc/images%3Apickle.gif"
How are you uploading the file, are you using Futon? I'm not sure
why it's
being attached with a colon used as a separator, but it sounds like
the
client you are using is doing some processing on the filename. If
you PUT
an attachment (using curl or similar) it should work fine. I'm not
sure how
to get Futon to put a slash in the filename in any case, as it just
names
the attachment the same as the file you're uploading. If you let
me know
how you are doing this maybe I can work up a patch for Futon if it is
needed.
Jason