Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2E5DF200B99 for ; Wed, 5 Oct 2016 20:02:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2CF63160ADE; Wed, 5 Oct 2016 18:02:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6DB2D160AC9 for ; Wed, 5 Oct 2016 20:02:11 +0200 (CEST) Received: (qmail 57340 invoked by uid 500); 5 Oct 2016 18:02:10 -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 57326 invoked by uid 99); 5 Oct 2016 18:02:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2016 18:02:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AE426C727B for ; Wed, 5 Oct 2016 18:02:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.72 X-Spam-Level: X-Spam-Status: No, score=-0.72 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=messagingengine.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Kgp0q1QdUeRA for ; Wed, 5 Oct 2016 18:02:09 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 71E285FAD5 for ; Wed, 5 Oct 2016 18:02:08 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id CCB8820756 for ; Wed, 5 Oct 2016 14:02:07 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 05 Oct 2016 14:02:07 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=8bGHG8KRDDH9kPV 2SdN94AwcZoI=; b=f2BjuZ41k7+Zb8qWvp5mlba4GuWxGf4Hv4m1c94nvkh6tts mgqGfAzBWAtIWdHnVM8pjcLIVndJ4OM+FOA/W1724mR7CfYfSRC7enmTXa3JFGoY rk+goygFOQi89z0vbR8T5yfUiR3rDD/WpbyPlrSJDEZl/yp8z/y0NXMxnppM= X-Sasl-enc: FoVEH3GYitcwNpTl76KzoQl1wstASZRUPPY3Tmpa3eyh 1475690527 Received: from [198.18.49.234] (unknown [217.146.29.68]) by mail.messagingengine.com (Postfix) with ESMTPA id 3D603F2D2A for ; Wed, 5 Oct 2016 14:02:07 -0400 (EDT) From: Robert Samuel Newson Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Subject: Re: _users upload attachment Date: Wed, 5 Oct 2016 19:02:06 +0100 References: <097C2D1F-D4B6-4AF4-8530-3E09503FE8F7@apache.org> To: user In-Reply-To: <097C2D1F-D4B6-4AF4-8530-3E09503FE8F7@apache.org> Message-Id: X-Mailer: Apple Mail (2.3226) archived-at: Wed, 05 Oct 2016 18:02:12 -0000 fyi diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index 07a5eba..1b7fb55 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -1222,7 +1222,7 @@ db_attachment_req(#httpd{method=3DMethod, = user_ctx=3DCtx}=3DReq, Db, DocId, FileNamePa couch_doc:validate_docid(DocId), #doc{id=3DDocId}; Rev -> - case fabric:open_revs(Db, DocId, [Rev], []) of + case fabric:open_revs(Db, DocId, [Rev], [{user_ctx,Ctx}]) = of {ok, [{ok, Doc0}]} -> Doc0; {ok, [Error]} -> throw(Error) end (END) > On 5 Oct 2016, at 18:54, Robert Samuel Newson = wrote: >=20 > Can you make a jira ticket at = https://issues.apache.org/jira/browse/COUCHDB please? >=20 > I have already found and solved the bug. >=20 > B. >=20 >> On 5 Oct 2016, at 17:42, max wrote: >>=20 >> I cannot add attachment to a document inside _users database. >> Here is the answer I got: >>=20 >> {"error":"unknown_error","reason":"function_clause","ref":1841055428} >>=20 >> I've tried in fauxton and from a REST client. >> Using CouchDB 2.0 Windows version. >>=20 >> Thanks. >>=20 >> Max. >=20