[File_Uploads] returns an array of maps representing the files which were uploaded. Each map contains information about one file including the following members:
- Path - The path to the temporary location where the uploaded file is stored. Also accessible as Upload.Name.
- File - A file object for the temporary file.
- Size - The size of the uploaded file in bytes. Also accessible as Upload.Size.
- Type - The type of the uploaded file. Also accessible as Upload.Type.
- Param - The name of the form parameter which the file was uploaded in.
- OrigName - The original name of the uploaded file (if provided) without any path information.
- OrigPath - The original path of the uploaded file (if provided). Also accessible as Upload.RealName.
- OrigExtension - The original file extensions of the uploaded file.
In addition the following legacy members are still reported.
- Upload.Name - The path to the temporary location of the file.
- Upload.Size - The size of the file in bytes.
- Upload.Type - The MIME type of the file.
- Upload.RealName - The name of the file which was uploaded.
[File_Uploads]
Use the [Loop] ... [/Loop] tags to loop through the [File_Upload] tag. The following exampe displays all the stored information about each uploaded file.
The results are shown for a file name MyPicture.gif which uploaded in a form element named Picture.
[Loop: (File_Uploads->Size)]
[Variable: 'File'=(File_Uploads)->(Get: Loop_Count)]
<p>Path: [Output: $File->(Find: 'upload.name')]
<br>Size: [Output: $File->(Find: 'upload.size')]
<br>Type: [Output: $File->(Find: 'upload.type')]
<br>Real: [Output: $File->(Find: 'upload.realname')]
[/Loop]
<p>Path: E://WinNT/Temp/Lasso-tmp1.uld
<br>Size: 32
<br>Type: image/gif
<br>Real: MyPicture.GIF
Tag Link | [File_Uploads] | Category | File |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 5.0 |
Output Type | Array | Security | Tag |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft