In CouchDb's documentation, the described method of deleting document attachments is to send a DELETE call to the attachment's url.
However, I have noticed that if you edit the document and remove the attachment stub from the _attachment field, it will not be accessible anymore.
If i remove foo.txt from the document below and save to CouchDb it will be gone the next time I access the document:
{
"_id":"attachment_doc",
"_rev":1589456116,
"_attachments":
{
"foo.txt":
{
"stub":true,
"content_type":"text/plain",
"length":29
}
}
}
Is the attachment actually deleted on disk or is just the reference to it deleted?