node.js – Using my own template stored in database with CarboneJS

I working with CarboneJS in NodeJS, in order to generate reports.

This is the documentation : https://carbone.io/documentation.html#getting-started-with-carbone-js

To use CarboneJS is simple:

carbone.render('./node_modules/carbone/examples/simple.odt', data, function(err, result){
  if (err) {
    return console.log(err);
  }
  fs.writeFileSync('result.odt', result);
});

What I want to do, is pass my own template (Which it stored in database), lets call it for example MyFileFromDatabase so I can do something like this :

const MyFileFromDatabase = new Buffer (myFile);

carbone.render(MyFileFromDatabase, data, function(err, result){
      if (err) {
        return console.log(err);
      }
      // write the result
      fs.writeFileSync('result.odt', result);
    });

What Im expecting to get : Carbone will render the document.

What I get :

complete erreur sendErrorHttp: TypeError: Cannot read property 'length' of undefined

I don”t know if such feature exist, or should I go with other strategies? Like using Streams?