Passing images from Node.js to Jade to be displayed in a table-row -
i try passing array of objects form node.js jade displayed table. works far. how have code it, when in 1 column image should displayed? in dataarray have database documents array of objects. have bild images correspond dataarray
the image rendered when code follows (see below) when try render part of table fails.
node.js
res.render('index', { title: 'image analysis - content of database', src: bild[0].tostring('base64'), dbdoc: dataarray });
index.jade
img(with=50 height=50 alt='wikipedia', src='data:img/png;base64,#{src}') table(border='1') thead tr th # th image id th processed th raspi location th celebrity th age th gender th additional fields tbody each val in dbdoc tr td= 1 td= val.imageid td= val.entryprocessed td= val.raspilocation td= val.celebrity td= val.age td= val.gender td= val.addfield
Comments
Post a Comment