You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Benoit Chesneau <bc...@gmail.com> on 2010/04/09 16:24:18 UTC

attachment upload API consistency

Hi all,

I'm finding annoying the lack of consistency in attachments upload API
and would like to think on a solution for it?

Inconsistency :

POST /database/docid accept form-data non streamed with futon hack
(_doc, _attachments)
PUT /doc/docid accept multipart-form streamed (somehow) first file is
content-type json -> doc  other are attachments

standalone API :

PUT /db/docid/attachmentd
DELETE /db/docid/attachmenet


standalone api is ok in term of REST imo, but not the first one. Also
the fact that attachments aren't really streamed on POST is a problem
for CouchApps. I think We want form-multipart too streamed on POST. So
we can eventually handle all uploads in CouchApps. Another possibility
would be an _attachment handler :

POST /db/_attachment/docid

....


Any thoughts ? If I provide needed code (sometimes in the coming week)
would it enter in 1.0 ?

- benoit