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 E2A5B1020B for ; Tue, 25 Mar 2014 09:52:48 +0000 (UTC) Received: (qmail 18299 invoked by uid 500); 25 Mar 2014 09:52:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17357 invoked by uid 500); 25 Mar 2014 09:52:46 -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 17332 invoked by uid 99); 25 Mar 2014 09:52:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 09:52:42 +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 (nike.apache.org: domain of north.n@gmail.com designates 209.85.192.172 as permitted sender) Received: from [209.85.192.172] (HELO mail-pd0-f172.google.com) (209.85.192.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 09:52:36 +0000 Received: by mail-pd0-f172.google.com with SMTP id p10so216757pdj.3 for ; Tue, 25 Mar 2014 02:52:14 -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=GlZosBKCO8iCEoN9aCqeOw2GpApHzP/Zdcb3KhrghoM=; b=BUSa/Kb6DqVRhsDEwFfw4f/g/vaJxfIrw6t56yY7Zoy/iiorTPfxyRbcDCKDIpqoK5 /zm5TCbJ7sJG27LNVYM5YxM4gB0Rrkw8iNyeu5jQm2D5EIsB8cMaBbtWRSHWgVhJnn4A vKNfZaU7T5O7S8prHeNOfzedT4UR0cCNoYwWB/Gh/OHdqdEMbrRlaSIbLb6Cx+bRVoqj Z0mKpnvlO1HvK8Kub0oXsoOrpVEwX3Y3QSykeqwB5HyBr18UdSPTXBLtIe/L8cfxmSYS FEG3xoBm3kHPGFEQrTKAwzMANB8IDVAE6zrOoWDkWsHphZ+b/O821BRSGJzN2lR1arfI yKnQ== MIME-Version: 1.0 X-Received: by 10.66.137.109 with SMTP id qh13mr54148673pab.39.1395741134233; Tue, 25 Mar 2014 02:52:14 -0700 (PDT) Received: by 10.68.73.135 with HTTP; Tue, 25 Mar 2014 02:52:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Mar 2014 09:52:14 +0000 Message-ID: Subject: Re: Uploading attachments using Multipart/related From: Nick North To: "user@couchdb.apache.org" Content-Type: multipart/alternative; boundary=001a1136229681257504f56b4e63 X-Virus-Checked: Checked by ClamAV on apache.org --001a1136229681257504f56b4e63 Content-Type: text/plain; charset=ISO-8859-1 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 > --001a1136229681257504f56b4e63--