Sorry but this is still unclear. Can you elaborate with an example and include details of where and how attachments are created, are these attachments expected to be synced to clients at least once , do the attachments get updated
In our case, we don’t want the attachments to sync down to Couchbase Lite as this will slow down replication and consume more bandwidth due to the huge size of the attachments (10-20 MB). The attachments are fetched/created/updated/deleted using Couchbase Sync Gateway attachment API in the cloud application and the attachment feature is disabled in the Couchbase Lite desktop client. But there is no way currently to stop the syncing down of attachments during a pull replication.
As confirmed by Jens, unfortunately this extremely usable feature is not available in 2.0 on any platform. Are there any plans to bring this feature back?
The same in our case as for dony.thomas. In addition I have a question: Is there a small change that I can do in the couchbase-lite-core to disable the attachments download?
@priya.rajagopal , for example commenting out the contents of findBlobReferences(DBAccess) seems to solve the problem, but there probably is a better solution.
Hi Dony - This feature is not supported in 2.0 and there are no immediate plans for supporting this. In fact, that feature was never really supported on all platforms even in 1.0
That said, if the size of attachments is a concern and if attachments are to not be synced down to the clients (or rather they need to be done on demand by clients at a later point ), then the recommended option would be to host the attachments on an external store and only embed the URL in the documents. Then the clients can determine when to fetch the attachments from the external store.
@Ionut_Cosmin_Mihai If you make changes to the source code, that will not be officially supported and we cannot guarantee that this will work as this could have unintended side affects. I don’t suspect that this will be a “small change” - This feature cannot be handled exclusively on the client side (i.e lite core). The replication protocol would also have to be updated to avoid pulling down attachments.