couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fli...@apache.org
Subject [couchdb-documentation] 01/01: Update the PUT {attachment} docs to reflect observed behavior.
Date Thu, 26 Oct 2017 22:02:56 GMT
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 <flimzy@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" <commits@couchdb.apache.org>.

Mime
View raw message