Good day,
Have a few questions I would like to ask in regards to file upload.
I’m investigating the question of uploading a file using rest api.
I did find information in regards to how it should look like: a text field on one side, and a
{
"variables": {
"field1":{
"value": {
"type": "File",
"valueInfo": {
"filename": "pic.png",
"mimeType": "image/png"
},
"field1": "iVBORw0KGgoAAAANSUhEUgAABTAAAAJQCAYAAAC5Pku2AAAAAXNSR0IArs4c6QAAIABJREFUeF7s3Qm8TeX7//8rocxEkjmSimRsIqIoKT5IRSIlQ6XJECmlNItSCJUMiTIUUSKJSoWiKInMKmTI0Mz/8V7f39n/"
}
}
}
}
on the other.
But is it properly handled? And how exactly is it handled in terms of persistence - is it wrapped as a tmp file, or does it go into the DB as a variable? And how to manipulate/configure this behavior?
I did find act_hi_detail
table, which, if I’m not mistaking, is related to variable history.
From there I had two tests done - one to upload a dummy file using javaDelegate:
execution.setVariable("myFile", new File(...));
And the other one was using rest API.
And here is what I got:
name_ var_type_ text2_
field1 spin://application/json java.util.LinkedHashMap<java.lang.Object,java.lang.Object>
and this is for the file upload using delegate:
spin://application/json java.io.File
Making my second question - is the rest api file upload done correctly?
BTW: Camunda 7
Thank you in advance
Small update: I have traced the rest api to act_ge_bytearray, and found that it is stored in DB.
I’m either doing something wrong, or assuming something wrong.