1.

How Can You Add An Attachment To A Document In Couchdb?

Answer»

The putAttachment() method is used to ADD an attachment to a document in PouchDB. You have to pass the document id, attachment id, MIME TYPE along with the attachment. This method also ACCEPTS an OPTIONAL callback function.

Syntax: db.putAttachment( docId, attachmentId, attachment, type, [callback] );

The putAttachment() method is used to add an attachment to a document in PouchDB. You have to pass the document id, attachment id, MIME type along with the attachment. This method also accepts an optional callback function.

Syntax: db.putAttachment( docId, attachmentId, attachment, type, [callback] );



Discussion

No Comment Found