On Fri Mar 05 19:36:47 2010, CKRAS wrote:
Show quoted text> Currently it's not possible to delete an attachment. It would be nice if
> this could be done simultaneously with updating a document (data and
> attachments), just like when creating/updating a document and attachment.
You can delete attachments, although there's not a dedicated delete
method. Let's say that $DOC is a CouchDB::Client::Doc that has an
attachment named "page.html"
delete $DOC->attachments->{'page.html'};
$DOC->update;
Will remove the attachment without changing anything else about the doc.
I've added a test for this to the test suite since it currently doesn't
test that.
http://github.com/maverick/couchdb-client/blob/master/t/15-client.t
look around line 222 for an example.
I'll probably add a delete method in the next release just for completeness.