Lasso Soft Inc. > Home

[ web_request->fileUploads ]


The [web_request->fileUploads] method returns information about any HTTP file uploads given to the current request. This method returns a sequence of containers (usually but not always a staticarray). Each of these sub-containers contains a sequence of pair values. Each pair contains as its ->first member the name of the file upload related value (the keys; listed below) and as its ->second member the value itself.

Each file upload will have pairs containing the following keys:

  • contenttype - The content type of the file
  • fieldname - the name of the file input field
  • filename - the original name of the file as it was sent to the server
  • tmpfilename - the path on the server to which the file was temporarily uploaded
  • filesize - the size of the file in bytes

Each uploaded file is written to a temporary directory and the path to that temporary file is provided (as 'tmpfilename'; shown above). At the end of the request, all uploaded files are deleted. Any files that are meant to be kept should be moved or copied from the temp directory to their intended destinations.

  • Syntax
  • Beginner

Display file upload information

This examples assumes two uploaded files. Each piece of file information is displayed.


with uplinfo in web_request->fileUploads
do {^
        with upl in #uplinfo
        do {^
            '<dd>'+#upl->first+': '+#upl->second+'</dd>'


contenttype: image/jpeg
fieldname: upfile
filename: uvsun_trace_big.jpg
tmpfilename: //tmp/lassopqP50M69607923.uld
filesize: 851191

contenttype: image/jpeg
fieldname: upfile2
filename: skies_like_these.jpg
tmpfilename: //tmp/lassoCFtsVs20807709.uld
filesize: 1813561

Recent Comments

No Comments found

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



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft