File in Cam-Script

how to create a variable of type file with cam-script, I tried

camForm.variableManager.createVariable ({
name: ‘File01’,
type: ‘File’,
value: document.getElementById (‘uploadDoc’).files.data,
isDirty: true
})

but without success does not create the variable in the cockpit