FileReader is not defined on javascript api on cloud code

I’m trying to save a image encoded in base64 to Files. I’ve tried to implement the solution as described here and I still receive the same error.

Is there any way to use this function on a node.js cloud code instance?

Blockquote
async uploadFile(encodedImage) {
let byteArray = Buffer.from(encodedImage.trim(), ‘base64’);
let savedFile = await Backendless.Files.saveFile(“test”, “test.jpg”, byteArray, true);

console.log("file : " + savedFile);

}

Hello @Jay_P,

Please provide
(1) your App ID
(2) the steps we can follow to reproduce this issue

Can we test the provided steps in your app?

Regards,
Olha