OpenWGA 7.11 - TMLScript reference

TMLForm "tmlform"
Method :

addFile(file, fileName)

On object TMLForm "tmlform"
Usage Adds a file from the servers file system to the form
Description The file is added to the form the same way that an uploaded file that was posted by the browser user would be. Therefor it is available to all TMLForm methods that use uploaded files, like tmlform.fileNames, tmlform.getFile() or tmlform.attach().

Not the source file itself is added to the form but a temporary copy of it that is created in the moment of the method invocation. So modifications to the source file done after method invocation do not influence the copy on the form.
Parameters file (Java object
File to attach

fileName (String):
File name by which the file will be added to the form.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions