exports.carregaContrato = function(id, cb){
Firebird.attach(firebirdConfig, function (err, db) {
if (err)
throw err;
db.query("select contrato_escaniado as IMAGE from cad_prospectos_contratos where codigo = ?", [id], function(err, result){
console.log(err, result[0].IMAGE)
db.detach();
cb(result)
})
})
}
I have this select from a Blob field I do not know what I'm doing wrong that the feedback I get is a function. In the console.log I have I get the following:
undefined [Function]
What I'm doing wrong, and how to solve. I want to receive as a return an image that I saved converted to base64 as a string, it's like this in my bank: