Sync Gateway - Blob Attachment delete

Hi Team,
we have a use case for the Sync Gateway attachment delete. There is a mobile app which uploads a document from their application which will be sent to a external system for further storage. User will not check these documents once they upload it, it is fire and forget scenario.

W e are think to get these sync gateway blob attachment using a webservice and sent to external system and then delete it at sync-gw level. How do we do that? I can get the document via GET api but how do i delete these attachments without deleting actual document.

Thanks.

Update the document without the attachment in it.

After the delete is the blob still in the database?

Until it gets garbage-collected at some unspecified time…

Let me clarify, does the binary attachment ever get removed from couchbase server?

I don’t see attachment document is getting deleted… not sure what is the unspecified time limit. Any idea?

@adamf … what’s the schedule for attachment GC?

There’s nothing officially scheduled, although there are ongoing discussions around alignment of attachment handling between CBL, SG and CBS that would include this topic.

Oh, I meant “how does SG schedule when to delete attachments” … so you’re implying that it’s not implemented at all yet?

Correct - there’s currently no GC for orphaned attachments.

so we have to manually delete those documents(attachment) from couch base bucket?