feat: convert data to base64 for interpretation while recording

This commit is contained in:
karishmas6
2024-10-16 14:12:50 +05:30
parent 77fbc99931
commit fd079ecdff

View File

@@ -229,8 +229,10 @@ export class WorkflowInterpreter {
this.socket.emit('serializableCallback', data);
},
binaryCallback: async (data: Buffer, mimetype: string) => {
this.binaryData.push({ mimetype, data: JSON.stringify(data) });
this.socket.emit('binaryCallback', { data, mimetype });
const base64Data = data.toString('base64');
const binaryObject = { mimetype, data: base64Data };
this.binaryData.push(binaryObject);
this.socket.emit('binaryCallback', binaryObject);
}
}