How to save a file in camunda-variable in java code from file system?

Hi all ,
@thorben
I am trying to write a code (in Java) to save a file (from a directory /home/admin/files ) in a camunda variable , that i want to show in the camunda tasklist .

So far ,

InputStream contractFile = new FileInputStream(currentFilePathAndName);
execution.setVariable(“current_file”, contractFile);

But , when I want to view it from front-end it shows as type Bytes.

I want the file to be visible as:

See this docs on how to properly set a variable of type File: https://docs.camunda.org/manual/7.8/user-guide/process-engine/variables/#file-values