use template

- pass only the file to the different methods
- use template
    - do not escape the file name manually
It was using name apart from file.name to give the user the possibility to upload the file with a different name (as it's in cs-portal), but ok, it was not used here