is it possible to use the camunda create REST API without having an actual file on the pcor the server?
I’m trying to add a deploy button in my bpmn-js modeler and read the XML and deploy it as in this example:
deploymentService = new camClient.resource('deployment');
bpmnModeler.saveXML({ format: true }, function(err, xml) {
console.log('DIAGRAM:1', xml);
var file = new File(xml,'fromWebApp.1312.bpmn');
var depData = {
deploymentName: targetengime,
deploymentSource: 'interactive editor',
enableDuplicateFiltering: true,
deployChangedOnly: true,
tenantId: '',
files: [file]//<<< HOW TO FILL THE FILE!!
};
var callback = function(var1,var2){
console.log(var1);
console.log(var2);
};
deploymentService.create(depData,callback)
});
but I’m getting this error:
so how can i fill the xml as file here!!!