Open hellboy81 opened 9 years ago
As I mentioned db.attachment.get
can not work simultaneously with pipe
and error
handling:
var attachment = db.attachment.get(documentName, attName, function (err) {
if (err) {
if (err.statusCode === 404) {
// Handle attachment not found
} else {
// Handle other error
}
}
// Throws error:
// You cannot pipe after data has been emitted from the response.
attachment.pipe(res)
}
This repository has been merged into apache/couchdb-nano, please continue the discussion here.
I should pipe attachment stream to response stream with correct error handling (missing attachment, etc..)
I am trying to check if attachment exists with db.attachment.head, but I am missing this method in
nano
Ha