How to display Binary image retrieved from MongoDB?

Viewed 78

Below is the image stored in my Mongo DB database : enter image description here

I am using mongoose to extract this document from the database. My goal is to retrieve this data and send it using express to client side as a network image.

Till now I am able to extract the Binary() file from that document. Below is the result : enter image description here

But I am not sure how can I pass this data to client side using express as an image file.

Thankyou in advance for helping.

0 Answers
Related