couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "HttpDocumentApi" by ChrisAnderson
Date Sat, 07 Jun 2008 16:24:49 GMT
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 ChrisAnderson:
http://wiki.apache.org/couchdb/HttpDocumentApi

The comment on the change is:
updated attachments API docs to reflect current reality

------------------------------------------------------------------------------
  
  == Attachments ==
  
- Documents can have attachments just like email. On creation, attachments go into a special
''_attachments'' attribute of the document. They are encoded in a JSON structure that holds
the name, the type and the data of an attachment. A document can have any number of attachments.
+ Documents can have attachments just like email. 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.
  
@@ -427, +427 @@

    {
      "foo.txt":
      {
-       "type":"base64",
+       "content_type":"text\/plain",
        "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
      }
    }
@@ -453, +453 @@

      "foo.txt":
      {
        "stub":true,
-       "type":"base64",
+       "content_type":"text\/plain",
        "length":29
      }
    }
@@ -487, +487 @@

    {
      "foo.txt":
      {
-       "type":"base64",
+       "content_type":"text\/plain",
        "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
      },
  
     "bar.txt":
      {
-       "type":"base64",
+       "content_type":"text\/plain",
        "data": "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
      }
    }

Mime
View raw message