LassoScript Utility
Basics Browse Detail


Tag Link [File_ProcessUploads] Category File
Type Substitution Source Available No
Support Preferred Version 8.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0


[File_ProcessUploads] automatically processes any files that were uploaded with the form that loaded the current page. This tag allows uploaded files to be moved to a target directory with either their original name or with the temporary name. The files can be filtered by type and size.

The tag requires one parameter which is the destination directory where the uploaded files should be moved. The location can be an absolute, relative, or fully qualified path. The user executing the tag must have permission to access both the file uploads directory and the destination directory.

Optional -MaxSize parameter allows the maximum size of uploaded files to be specified in bytes. Files larger than this size will not be moved to the destination directory. Optional -Extensions parameter accepts an array of file extensions which should be moved to the detination directory. Any files whose file extension is not contained in this list will not be moved. Defaults to moving files with any extensions which Lasso is allowed to process.

Optional -FileOverWrite paramter specifies that files with the same name as the uploaded file in the destination directory should be overwritten. By default, duplicate files are not moved. Optional -UseTempNames parameter instructs the tag to move the files with their temporary .uld names rather than restoring them to their original names prior to being uploaded.


[File_ProcessUploads: '/UploadedFiles/']

[File_ProcessUploads: '/UploadedFiles/', -MaxSize=1024, -Extensions=(Array: 'gif','jpg')]


Required Parameters
-Destination The path where the uploaded files should be moved.
Optional Parameters
-MaxSize The maximum file size to process. Defaults to processing all files.
-Extensions An array of file extensions which should be processed. Defaults to all the extensions that Lasso can process.
-FileOverwrite If specified then duplicate filenames in the destination will be overwritten.
-UseTempNames If specified then the temporary file names will be used rather than the original file names.


See the Lasso 8 Language Guide for examples of how to use this tag.