blob contents - PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmb2N1c2FibGU9ImZhbHNlIj48cGF0aCBkPSJNMTIgMWM2LjA3NCAwIDEwLjk5OSA0LjkyNSAxMC45OTkgMTEgMCA2LjA3NC00LjkyNSAxMC45OTktMTEgMTAuOTk5LTYuMDc0IDAtMTAuOTk5LTQuOTI1LTEwLjk5OS0xMUMxIDUuOTI1IDUuOTI1IDEgMTIgMXptMCAxOC4xNzNhNy4xNzQgNy4xNzQgMCAxMC0uMDAxLTE0LjM0NyA3LjE3NCA3LjE3NCAwIDAwMCAxNC4zNDd6bTAtMy42NTNhMy41MiAzLjUyIDAgMTEwLTcuMDQgMy41MiAzLjUyIDAgMDEwIDcuMDR6IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjwvcGF0aD48L3N2Zz4K
const chainNumber = req.params.chainNumber;
try {
connection.execute(
`select logo
from chain_logos
where chain_id = :1`,
[chainNumber], {
outFormat: oracledb.ARRAYBUFFER
},
async function(err, result) {
if (err) {
console.error(err.message);
return;
}
connection.close();
const data = result.rows.map(row => ({
logo: Buffer.from(row[0]).toString('base64'),
logo2: Buffer.from(row[0], 'base64'),
logo3: row[0]
}))
return res.send({ data });
});
} catch (err) {
console.log('Error: ', err);
return res.send(`error returning chain logo`);
}
I'm only seeing an empty buffer returned from the code even though there is blob data: {"data":[{"logo":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"logo3":{"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":null,"tail":null,"length":0},"length":0,"pipes":[],"flowing":null,"ended":false,"endEmitted":false,"reading":false,"sync":true,"needReadable":false,"emittedReadable":false,"readableListening":false,"resumeScheduled":false,"errorEmitted":false,"emitClose":true,"autoDestroy":true,"destroyed":false,"errored":null,"closed":false,"closeEmitted":false,"defaultEncoding":"utf8","awaitDrainWriters":null,"multiAwaitDrain":false,"readingMore":false,"decoder":null,"encoding":null},"_events":{},"_eventsCount":1,"_writableState":{"objectMode":false,"highWaterMark":16384,"finalCalled":false,"needDrain":false,"ending":false,"ended":false,"finished":false,"destroyed":false,"decodeStrings":false,"defaultEncoding":"utf8","length":0,"writing":false,"corked":0,"sync":true,"bufferProcessing":false,"writecb":null,"writelen":0,"afterWriteTickInfo":null,"buffered":[],"bufferedIndex":0,"allBuffers":true,"allNoop":true,"pendingcb":0,"prefinished":false,"errorEmitted":false,"emitClose":true,"autoDestroy":true,"errored":null,"closed":false},"allowHalfOpen":true,"offset":1,"_isActive":false,"_parentObj":{"_rowCache":[],"_processingStarted":false,"_convertedToStream":false,"_allowGetRowCall":false,"_isActive":false,"_parentObj":{"_events":{},"_eventsCount":1,"_dbObjectClasses":{},"_requestQueue":[],"_inProgress":true,"_pool":{"_events":{},"_eventsCount":2,"_queueTimeout":60000,"_queueMax":500,"_enableStatistics":false,"edition":"","events":false,"externalAuth":false,"homogeneous":true,"user":...