How to add attachments?

With Couchbase Server buckets directly, you have always been able to store binaries as key-values. I think @jmorris can probably give you a pointer to how to handle this in the 2.0 SDK.

Owing to some different plans, Couchbase Mobile changed this and supports attachments to documents. It’s not supported to connect to the Sync Gateway bucket directly. At the moment, the REST API is the only way to access this from Sync Gateway.