incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject attachment upload API consistency
Date Fri, 09 Apr 2010 14:24:18 GMT
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

Mime
View raw message