Repository: couchdb-chttpd Updated Branches: refs/heads/master cb0f20ea0 -> 90648a2e0
allow w parameter for attachments Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/90648a2e Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/90648a2e Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/90648a2e Branch: refs/heads/master Commit: 90648a2e0bb4718cdd701f537f3de47dedb9b2c2 Parents: cb0f20e Author: lazedo <[email protected]> Authored: Wed Jan 4 18:45:31 2017 +0000 Committer: GitHub <[email protected]> Committed: Wed Jan 4 18:45:31 2017 +0000 ---------------------------------------------------------------------- src/chttpd_db.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/90648a2e/src/chttpd_db.erl ---------------------------------------------------------------------- diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl index a361f00..f3dd2ab 100644 --- a/src/chttpd_db.erl +++ b/src/chttpd_db.erl @@ -1243,7 +1243,8 @@ db_attachment_req(#httpd{method=Method, user_ctx=Ctx}=Req, Db, DocId, FileNamePa DocEdited = Doc#doc{ atts = NewAtt ++ [A || A <- Atts, couch_att:fetch(name, A) /= FileName] }, - case fabric:update_doc(Db, DocEdited, [{user_ctx,Ctx}]) of + W = chttpd:qs_value(Req, "w", integer_to_list(mem3:quorum(Db))), + case fabric:update_doc(Db, DocEdited, [{user_ctx,Ctx}, {w,W}]) of {ok, UpdatedRev} -> HttpCode = 201; {accepted, UpdatedRev} ->
