LassoScript Utility
Basics Browse Detail


Tag Link [File_Uploads] Category File
Type Substitution Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type Array Security Tag
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0


[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.




No Parameters Required.

Change Notes

Many elements were added to the maps contained in [File_Uploads] in Lasso Professional 8, but all the old elements were left unchanged for backward compatibility.


To display information about all the files that were uploaded:

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: '')]
  <br>Size: [Output: $File->(Find: 'upload.size')]
  <br>Type: [Output: $File->(Find: 'upload.type')]
  <br>Real: [Output: $File->(Find: 'upload.realname')]

<p>Path: E://WinNT/Temp/Lasso-tmp1.uld
<br>Size: 32
<br>Type: image/gif
<br>Real: MyPicture.GIF