Tasklist Save Functionality - File variables not properly persisted

Hi there,

I have created an embedded form for multiple file uploads with a custom ‘upload’ button.
On click of the upload, I read the contents of the files as Base64, and create a new process variable for every file selected using the below function:

camForm.variableManager.createVariable({
name: fileName,
type: ‘File’,
value: encodedFileContents,
valueInfo: {
filename: theFilename,
mimetype: theFileMimeType
}
});

As expected, if I complete the form, this is sent through to the backend database as a File and can be accessed through the java delegate as a FileValue object.
The problem is that if I save the form, exit to another task, and come back to upload an additional file, the previously created variables have not persisted properly - the valueInfo has been removed, and the variable type is now String.

Is there any way that I can properly persist the file objects and valueInfo using the built in Camunda save functionality?

Thanks