0
votes

I have a Oracle database that stores images as blob, and a NodeJs app connected in that using node-oracleDb.

how can I get those images? I've no idea how to turn those blob into a image object.

First, get the BLOB into a Node.js variable - an example is in oracle.github.io/node-oracledb/doc/api.html#queryinglobs. Then you need to either write it to a file (if that's what you want) or send it back over HTTP(S) to your user. This will depend on what framework or HTTP library you are using. Search 'displaying image in node.js' since there are plenty of discussions and examples on StackOverflow. A simple example is in github.com/oracle/node-oracledb/blob/main/examples/blobhttp.js This example streams the blob. - Christopher Jones