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 3EF7B10228 for ; Tue, 25 Mar 2014 09:56:44 +0000 (UTC) Received: (qmail 26489 invoked by uid 500); 25 Mar 2014 09:56:42 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 26411 invoked by uid 500); 25 Mar 2014 09:56:40 -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 26403 invoked by uid 99); 25 Mar 2014 09:56:39 -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 09:56:39 +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.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-la0-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 09:56:34 +0000 Received: by mail-la0-f45.google.com with SMTP id hr17so166512lab.4 for ; Tue, 25 Mar 2014 02:56:13 -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=b5e42b+WZJtl5k91BrrC2rfLjwQtrA5Bcy1Q2oBBd3o=; b=V7xmlHHLCNajBWOSXv7rX7DrFEnUfaFAVAG0ekdF4zBkDAlre8g4hjCaOSLVkgY4mF HBbIEgHqPHA1qpk9N162nfyV6KPk5C1TNTJm7kgtOJ+JJQZSL3WbzuWXI1Ciuy8cfmlI LiBnBlvkJ59LBGWyUpxcwy6kwuSod7Pik+fBrwIPpnVxSFf7wblw4Cf9wkL6WKYPQSSG iJ6+wzNKtUPoTF16CcBW5y1ATmOWRti2OR0EdPsl8gC0wS1iUMWEERAGeTBiLCLoXd/Y Q8A/EyAAsLmIExT+6h4+iDcq285FaZu0NIUMmpASwno+R5TS4hzjwHaSmKHMzrfWGQF+ eQ3A== MIME-Version: 1.0 X-Received: by 10.152.10.72 with SMTP id g8mr348043lab.50.1395741372889; Tue, 25 Mar 2014 02:56:12 -0700 (PDT) Received: by 10.112.118.195 with HTTP; Tue, 25 Mar 2014 02:56:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Mar 2014 17:56:12 +0800 Message-ID: Subject: Re: Uploading attachments using Multipart/related From: JC de Villa To: CouchDB Mailing List Content-Type: multipart/alternative; boundary=001a1132efa2babc7f04f56b5c2d X-Virus-Checked: Checked by ClamAV on apache.org --001a1132efa2babc7f04f56b5c2d Content-Type: text/plain; charset=ISO-8859-1 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 --001a1132efa2babc7f04f56b5c2d--