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 f690c93967d34354d63b8aef576490b74dbe474a Author: Jonathan Hall <[email protected]> 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..ad99dd3 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, otherwise empty document will be created + with the provided attachment, 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 "[email protected]" <[email protected]>.
