Add attachment using JAVA SDK


I learned about uploading Json document.

I want to upload a pdf/png/jpeg file. How do we do that?

I cannot fine and API for the same. The attachment option I can find in mobile development

Attachments can only be uploaded by using Sync gateway or Couchbase lite. No support on server side as far as I know.