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 F2350102F3 for ; Tue, 25 Mar 2014 10:21:09 +0000 (UTC) Received: (qmail 78703 invoked by uid 500); 25 Mar 2014 10:21:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78274 invoked by uid 500); 25 Mar 2014 10:21:07 -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 78262 invoked by uid 99); 25 Mar 2014 10:21:05 -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:21:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of north.n@gmail.com designates 209.85.192.182 as permitted sender) Received: from [209.85.192.182] (HELO mail-pd0-f182.google.com) (209.85.192.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 10:20:59 +0000 Received: by mail-pd0-f182.google.com with SMTP id y10so241702pdj.13 for ; Tue, 25 Mar 2014 03:20:39 -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=Gb7g22suFgKYXphwierX/fajEhqjGExJZQHUhLYpk7k=; b=EKNNyhh13KSUI58n4kNTVB0lkarYXl5Gdgk0Hsa/V+PcCQAnNMReKZWfTCnt0Z7le6 dodAOWqs2AjneS09E3SEi7lxafFDp/Qr2rkKLevwY/CFznNeu04F7K5Id/x1eIZWdjkX DpSeoefLuIj8PEAigRYi+ZIpUFQHnKHYoVYvTVjdbPlZX7H9zKILZkT1pWsrfpWl5mI2 ygJn5Kt456gDxMr0OpDc7eSqeIMxBw48xbnv/UozRBtob202lgmwm040QtqjQjvng1DR yWqZyGx2yBLVsZGia5wLbplcyIarytTJxPrerWvvcw1Jq5VEWHEenwGJH+WIS71LC7SI KYHw== MIME-Version: 1.0 X-Received: by 10.66.228.201 with SMTP id sk9mr14951779pac.134.1395742839410; Tue, 25 Mar 2014 03:20:39 -0700 (PDT) Received: by 10.68.73.135 with HTTP; Tue, 25 Mar 2014 03:20:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Mar 2014 10:20:39 +0000 Message-ID: Subject: Re: Uploading attachments using Multipart/related From: Nick North To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=047d7b15a1ff2414f604f56bb488 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15a1ff2414f604f56bb488 Content-Type: text/plain; charset=ISO-8859-1 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 > --047d7b15a1ff2414f604f56bb488--