local-only document attachments

13 views
Skip to first unread message

Jordan Wood

unread,
Jan 6, 2016, 3:38:09 PM1/6/16
to Couchbase Mobile
I have an unusual use case that I am considering.  In our app, we download PDFs to the device which, for legal reasons, we may never be allowed to store on our servers.  We would like to sync the metadata for these PDFs, so that a user can see the list of PDFs that they have looked at on any of their devices.  I see that there is a "Deferred Attachment Downloading" page on the iOS Wiki.  Am I crazy to consider keeping the PDF as an attachment in the local database which is never uploaded?  You get the possibility that the producer of the PDFs will change the PDF, and then the SHA that is propagated isn't correct for what might be on the device.  Of course, we could then let the user know that it has updated...

Upon reflection, I think I am crazy, but I'm interested if anyone has thoughts about keeping attachments which will never be synced.  Also, is deferred attachment downloading still on the table for version 1.2?

Jens Alfke

unread,
Jan 6, 2016, 5:25:45 PM1/6/16
to mobile-c...@googlegroups.com
It’s not crazy. You can use a filter to prevent those documents from being pushed by the replicator. (See CBLReplication.filter.)

—Jens
Reply all
Reply to author
Forward
0 new messages