$form:files
Such a construction return hash with all form files. Hash keys' names are the same as the names of form fields. See below.
$form:files.field_name
If a form field has at least one file-value, such a construction returns a hash (object of class hash) with keys 0, 1, 2..., containing all files with specified field name. It is used for getting multiple files with the same field name.
Important notice: before performing operations with a hash, you should first check if it exists.
Example ^if(def $form:picture){ <p>Loaded pics (^form:files.picture._count[]): ^form:files.picture.foreach[sNum;fValue]{
$fValue.name
^fValue.save[binary;/upload/pictures/${sNum}.^file:justext[$fValue.name]]
}[,]
</p> }
<form method="post" enctype="multipart/form-data">
<p>Choose some pictures for uploading:<br />
<input type="file" name="picture" /><br />
<input type="file" name="picture" /><br />
<input type="file" name="picture" /><br />
<input type="submit" value="Upload" />
</p>
</form>
Note: uploaded images names will be shown in random order.