Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 28993 invoked from network); 26 Feb 2009 09:54:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2009 09:54:04 -0000 Received: (qmail 57518 invoked by uid 500); 26 Feb 2009 09:54:04 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 57425 invoked by uid 500); 26 Feb 2009 09:54:03 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 57416 invoked by uid 500); 26 Feb 2009 09:54:03 -0000 Delivered-To: apmail-incubator-couchdb-commits@incubator.apache.org Received: (qmail 57413 invoked by uid 99); 26 Feb 2009 09:54:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 01:54:03 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO aurora.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Feb 2009 09:54:03 +0000 Received: from aurora.apache.org (localhost [127.0.0.1]) by aurora.apache.org (8.13.8+Sun/8.13.8) with ESMTP id n1Q9rfLl018376 for ; Thu, 26 Feb 2009 09:53:41 GMT Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: couchdb-commits@incubator.apache.org Date: Thu, 26 Feb 2009 09:53:41 -0000 Message-ID: <20090226095341.18242.60088@aurora.apache.org> Subject: [Couchdb Wiki] Update of "HTTP Document API" by JanLehnardt X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification. The following page has been changed by JanLehnardt: http://wiki.apache.org/couchdb/HTTP_Document_API The comment on the change is: document attachments=true option ------------------------------------------------------------------------------ === Inline Attachments === On creation, attachments go into a special ''_attachments'' attribute of the document. They are encoded in a JSON structure that holds the name, the content_type and the base64 encoded data of an attachment. A document can have any number of attachments. - When retrieving documents, the attachment's actual data is not included, only the metadata. The actual data has to be fetched separately, using a special URI. + When retrieving documents, the attachment's actual data is not included, only the metadata. The actual data has to be fetched separately, using a special URI. + + If you need to access attachments with the document in one request, you can pass in the `?attachments=true` URL parameter to get the data included in the JSON in the base64 encoded form. Since this puts a significant burden on CouchDB when you request this, you're not advised to use this feature unless you know what you are doing :) Creating a document with an attachment: