Purging unused attachments

30 views
Skip to first unread message

Scott Ahten

unread,
Oct 20, 2015, 6:19:20 PM10/20/15
to Couchbase Mobile
I'm trying to replace hi-res photo attachments with low-res previews to reduce storage on-device after the hi-res photo has been synced to the gateway sever. 

As I understand it, the only way to remove the orphaned attachment is to call [CBLDatabase compact]. Correct?


Jens Alfke

unread,
Oct 20, 2015, 7:47:32 PM10/20/15
to mobile-c...@googlegroups.com

On Oct 20, 2015, at 3:19 PM, Scott Ahten <lightand...@gmail.com> wrote:

As I understand it, the only way to remove the orphaned attachment is to call [CBLDatabase compact]. Correct?

Compact will delete attachment files that are no longer used by any revision. So before the compact you’d need to purge the document (or just the revision) that contains the attachment.

—Jens
Reply all
Reply to author
Forward
0 new messages