Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 16105 invoked from network); 30 Dec 2008 17:29:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Dec 2008 17:29:57 -0000 Received: (qmail 98059 invoked by uid 500); 30 Dec 2008 17:29:51 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 98017 invoked by uid 500); 30 Dec 2008 17:29:51 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 98006 invoked by uid 99); 30 Dec 2008 17:29:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2008 09:29:51 -0800 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jason@jasondavies.com designates 89.145.97.179 as permitted sender) Received: from [89.145.97.179] (HELO www1.netspade.com) (89.145.97.179) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Dec 2008 17:29:42 +0000 Received: from jddavies.gotadsl.co.uk ([82.133.112.184] helo=[10.0.0.14]) by www1.netspade.com with esmtpa (Exim 4.69) (envelope-from ) id 1LHiSe-0006sX-AR for user@couchdb.apache.org; Tue, 30 Dec 2008 17:32:57 +0000 Message-Id: From: Jason Davies To: user@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 30 Dec 2008 17:29:19 +0000 References: <748468271.1228208084256.JavaMail.jira@brutus> <38305035.1230620804557.JavaMail.jira@brutus> <65480B84-780D-472A-B336-900F575B076D@jasondavies.com> <56D233FE-3565-4F1C-90CC-AF9E178A9134@jasondavies.com> <74B937E7-F5A4-435C-87EC-87DC4D6AC34C@jasondavies.com> X-Mailer: Apple Mail (2.930.3) X-SA-Exim-Connect-IP: 82.133.112.184 X-SA-Exim-Mail-From: jason@jasondavies.com X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on www1.netspade.com X-Spam-Level: Subject: Re: [jira] Closed: (COUCHDB-167) Files can not be attached to documents with forward slashes in their names to simulate a folder hierarchy X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000) X-SA-Exim-Scanned: Yes (on www1.netspade.com) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, WEIRD_PORT autolearn=no version=3.2.5 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 > 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 >>