Hey,
I've been trying to delete attachments by using the
couchbase lite api but no luck and not sure what I am doing wrong.
I've been using postman to do this (I create attachments using postman and that works fine).
Heres what I do...
DELETE https://{domain}/{bucket}/{doc_id}/{attachment_name}?rev=1-SomeRevisionIdHere
Headers:
Content-Type: image/jpeg
I've also tried it adding the header If-Match: 1-SomeRevisionIdHere instead of the param rev in the url.
On the sync gateway side I see it getting hit..
22:58:16.647588 HTTP: #035: DELETE /{bucket}/{doc_id}/{attachment_name}?rev=1-SomeRevisionIdHere
But on postman I get a 405 error and the body is..
{
error: "Method Not Allowed"
reason: ""
}
Also the attachment is not deleted.
Does any one have any idea what I am doing wrong?
Thanks!
Jason