Answers for "image buffer to base64 nodejs"

-2

nodejs read image as base64

const fs = require('fs');
const contents = fs.readFileSync('/path/to/file.jpg', {encoding: 'base64'});
Posted by: Guest on May-06-2021
-2

nodejs read image as base64

const fs = require('fs').promises;
const contents = await fs.readFile('/path/to/file.jpg', {encoding: 'base64'});
Posted by: Guest on May-06-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language