I am trying to do an Insert SQL query using the mssql
package on Node.js.
But one of the arguments is a varbinary of an image that is "uploaded" in the database.
Example: 0x78DAC...
and so on.
I am not using a File Input to read the image. My project involves taking a screenshot from a website (using puppeteer), then I execute a code to pick the image and convert it.
How can I turn an image file (an .jpeg for example) into an array of bytes or a varbinary string, so I can use this on my SQL? Is there a npm package that can help me with this?