Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7D12810328 for ; Tue, 25 Mar 2014 10:31:58 +0000 (UTC) Received: (qmail 92657 invoked by uid 500); 25 Mar 2014 10:31:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91885 invoked by uid 500); 25 Mar 2014 10:31:56 -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 91866 invoked by uid 99); 25 Mar 2014 10:31:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 10:31:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jc.devilla@gmail.com designates 209.85.215.41 as permitted sender) Received: from [209.85.215.41] (HELO mail-la0-f41.google.com) (209.85.215.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 10:31:48 +0000 Received: by mail-la0-f41.google.com with SMTP id gl10so200509lab.28 for ; Tue, 25 Mar 2014 03:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UkgV4fDQx34ITVtYHsz9EWpDmdFINGJzzzf8Fq6Nmkw=; b=szb3lCI0Cwp2xg5ykmGNAWV3GDVqPzoDe2SMyOMukChtQe9Jz2+H6ZPRvl1M3lYlxx qVlgTpP5cPJiKcV7w20Tky/rol8Ei6CMbY+9KfcaHXW4WnrfT/GjCv7ykxRgCPf3Kzo+ sJBn4nhX1B0cBLFOdE5Raok2RscNlHmlTVPl1CTR90yZupUpQT0D6CIpsISPNSMqKTJM ozekjpvaaOEirBFRg7YxJmDrzn4Q0TxEyGS5WglKsRMUaglNuMB+0qRoF0/YY5IYFY6+ 8MgBKhoP79ieIiwjLgAoiPAsU222DBkbmNBxWZr3iC84eryUlYDDYS0xzFTBN9d34CjH csjQ== MIME-Version: 1.0 X-Received: by 10.112.205.35 with SMTP id ld3mr5828222lbc.1.1395743486914; Tue, 25 Mar 2014 03:31:26 -0700 (PDT) Received: by 10.112.118.195 with HTTP; Tue, 25 Mar 2014 03:31:26 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Mar 2014 18:31:26 +0800 Message-ID: Subject: Re: Uploading attachments using Multipart/related From: JC de Villa To: CouchDB Mailing List Content-Type: multipart/alternative; boundary=001a11c3d864bc357604f56bda16 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3d864bc357604f56bda16 Content-Type: text/plain; charset=ISO-8859-1 Thanks Nick, much appreciated. On Tue, Mar 25, 2014 at 6:20 PM, Nick North wrote: > Sounds as if that should work then. I'm not much of a curl user, so don't > know if there are any other potential problems in the command line. I'm not > around my CouchDb installations today, but I can construct a working > request this evening if no-one else beats me to it. > > Nick > > > On 25 March 2014 09:56, JC de Villa wrote: > > > I had the same thought in that it might be the parser complaining about > > formatting, and I've made sure that it matches the example exactly. > > > > > > On Tue, Mar 25, 2014 at 5:52 PM, Nick North wrote: > > > > > Do you have the same initial line breaks as in the example? I can't > > > remember the exact details at the moment, but mime parsing can be > > sensitive > > > about that and, if you are missing the line break before the first > > boundary > > > string, it might skip over the JSON body. > > > > > > Nick > > > > > > > > > On 25 March 2014 09:25, JC de Villa wrote: > > > > > > > Hmm, > > > > > > > > I get the same using -T and --data-binary (tried again just now). > > > > > > > > > > > > > > > > > > > > On Tue, Mar 25, 2014 at 5:22 PM, Alexander Shorin > > > > wrote: > > > > > > > > > On Tue, Mar 25, 2014 at 1:19 PM, JC de Villa > > > > > wrote: > > > > > > curl -X PUT -H 'Content-Type: multipart/related; > boundary="abc123"' > > > > > > http://localhost:5984/odms_contents/abc -d@test.data > > > > > > > > > > That's the problem. -d sends data as text. you should use > > > > > --data-binary or -T argument to send it as binary. > > > > > > > > > > -- > > > > > ,,,^..^,,, > > > > > > > > > > > > > > > > > > > > > -- > > > > JC de Villa > > > > > > > > > > > > > > > -- > > JC de Villa > > > -- JC de Villa --001a11c3d864bc357604f56bda16--