You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by fl...@apache.org on 2017/10/26 22:02:55 UTC

[couchdb-documentation] branch putAttWithoutRev created (now febe659)

This is an automated email from the ASF dual-hosted git repository.

flimzy pushed a change to branch putAttWithoutRev
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


      at febe659  Update the PUT {attachment} docs to reflect observed behavior.

This branch includes the following new commits:

     new febe659  Update the PUT {attachment} docs to reflect observed behavior.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].

[couchdb-documentation] 01/01: Update the PUT {attachment} docs to reflect observed behavior.

Posted by fl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

flimzy pushed a commit to branch putAttWithoutRev
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git

commit febe6596285ffc6d6f46eeb5626fc090a83cd821
Author: Jonathan Hall <fl...@flimzy.com>
AuthorDate: Fri Oct 27 00:02:38 2017 +0200

    Update the PUT {attachment} docs to reflect observed behavior.
---
 src/api/document/attachments.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/api/document/attachments.rst b/src/api/document/attachments.rst
index 7d64289..1dd6f8c 100644
--- a/src/api/document/attachments.rst
+++ b/src/api/document/attachments.rst
@@ -109,10 +109,11 @@
     :synopsis: Adds an attachment of a document
 
     Uploads the supplied content as an attachment to the specified document.
-    The attachment name provided must be a URL encoded string. You must also
-    supply either the ``rev`` query argument or the :header:`If-Match` HTTP
-    header for validation, and the HTTP headers (to set the attachment content
-    type).
+    The attachment name provided must be a URL encoded string. You must supply
+    the Content-Type header, and for an existing document you must also supply
+    either the ``rev`` query argument or the :header:`If-Match` HTTP header. If
+    the revision is omitted, a new document will be created, or a conflict will
+    occur.
 
     If case when uploading an attachment using an existing attachment name,
     CouchDB will update the corresponding stored content of the database. Since
@@ -129,7 +130,7 @@
     :param attname: Attachment name
     :<header Content-Type: Attachment MIME type. *Required*
     :<header If-Match: Document revision. Alternative to `rev` query parameter
-    :query string rev: Document revision. *Required*
+    :query string rev: Document revision. *Optional*
     :>json string id: Document ID
     :>json boolean ok: Operation status
     :>json string rev: Revision MVCC token

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.