On Apr 15, 2008, at 01:13, Ralf Nieuwenhuijsen wrote:
Hi, i'm tempting to go an all javascript route interfacing with
couchdb.
(i'm using qooxdoo)
But two potentional aspects worry me:
1. Will it be supported in the future to post an attachment directly?
This would make it possible ot use the browser to directly upload a
file to
the couchdb server
POST /somedatabase/somedoc/_attachment HTTP/1.0 <== adds a new
attachment
I've seen support for form handling in the MochiWeb code and this
looks very interesting to me, so we might get that at some point. But
it is not priority.
2. Will it be possible to use allow a post alternative for put &
delete
operations?
This would enable crossdomain usage using an iframe backend ;-)
POST /somedatabase/_bulk_docs HTTP/1.0 <== put alternative
already exists!
POST /somedatabase/_bulk_delete HTTP/1.0 <== delete
alternative doesn't exist yet!
Maybe, Patches are welcome :) What you can do already is setting the
_deleted flag in your _bulk_docs JSON for the docs that need to be
deleted and have them removed en-bulk.
PS. Do we delete attachment by just removing them from the document?
Yup.
Cheers
Jan
--