How to permanently delete Couchbase attachments (obsolete)

We use Couchbase server to store documents with media attachements (images).
We also need to be able to delete documents with attchements.
I came around this issue lately
It states that it is not possible to delete attachement for some reason and compation does not remove them either.

So how can I delete attachments? Is there any workaround for this issue for now? I read alot of similar posts , but i didnt find any real answer from developers of Couchbase.

Facing the same issue here. Any solutions?

Yeah- This is a known issue that we are looking to resolve in a future release. At this time, when you delete a document with an attachment, you should also manually delete the corresponding attachments on server.

So for example,
Here is an example of a document with attachment

“imageData”: {
“digest”: “sha1-dj/zUbfeRZSuNP4jFnQz4VHMUA0=”,
“content_type”: “image/jpeg”,
@type”: “blob”,
“length”: 3851631
“type”: “user”,
“name”: “foo”

The digest references the attachment. The corresponding attachment Id would be the digest prefixed with “_sync:att”. So in this example, the attachment Id would be “_sync:att:sha1-dj/zUbfeRZSuNP4jFnQz4VHMUA0=”

Tagging @adamf for any additional input on the query…

So how is it possible to delete the attachment using this id exactly ? Using the document admin API?

Using a server side API. There are no delete attachments API in Sync Gateway REST API. So you would have to query for documents on server side and then delete it using an API similar to this

Delete From userprofile WHERE meta().id ="_sync:att:sha1-f7txiLD97QvYIW/8aVE2hEy/LfM="