Dapatkan buffer dari file javascript

const fileBuffer = Buffer.from(file, 'base64')
// OR
fs.readFile(file, function(err, buffer){})
Undefined