db.getAttachment(docId, attachmentId, [options], [callback])
Get attachment data.
options.rev
rev
Get an attachment with filename 'att.txt' from document with ID 'doc':
'att.txt'
'doc'
db.getAttachment('doc', 'att.txt').then(function (blobOrBuffer) { // handle result }).catch(function (err) { console.log(err); });
Get an attachment with filename 'att.txt' from document with ID 'doc', at the revision '1-abcd':
'1-abcd'