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:
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.
web_request->fileUploads
This examples assumes two uploaded files. Each piece of file information is displayed.
Code
with uplinfo in web_request->fileUploads
do {^
'<dl>'
with upl in #uplinfo
do {^
'<dd>'+#upl->first+': '+#upl->second+'</dd>'
^}
'</dl>'
^}
Result
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
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
Recent Comments