Link | uploadVars |
Author | Alex Pilson |
Category | Utility |
Version | 8.5.x |
License | Public Domain |
Posted | 03 Jul 2007 |
Updated | 03 Jul 2007 |
More by this author... |
Creates vars of the upload map elements. Optionally alowing to prepending the var name. A refmap is also created to view the newly created vars.
iterate(file_uploads, var('uploadArray')); uploadVars('uploadArray');'
'; $mapRef;'
'; /iterate;
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag( 'uploadVars', -required='iterator', -priority='replace', -optional='pre', -description='Creates vars of the upload map elements. Optionally alowing to prepending the var name. A refmap is also created to view the newly created vars.' ); local('p' = local('pre')); var('mapRef' = map); local('u' = var(#iterator)); /* OPTIONS: use the iterator to pass the varibale being used to extract each iteration of the file_uploads. Returns the following example: VAR NAME : VALUE ASSOCIATED ---------------------------------------------------------- type : image/jpeg origname : asa-hs-musical.jpg fieldname : file1 type : image/jpeg param : file1 realname : asa-hs-musical.jpg size : 487659 origpath : path : ///var/tmp/lasso-tmphWT7S590722308.uld size : 487659 origextension : jpg name : ///var/tmp/lasso-tmphWT7S590722308.uld file : iterate(file_uploads, var('uploadArray')); uploadVars('uploadArray');'
'; $mapRef;'
'; /iterate; */ file_uploads->size == 0 ? return(''); iterate(#u, local('e')); local('newname' = #p + (#e->first)->replace('upload.','') &); var(#newname) = #e->second; $mapRef->insert(#newname = var(#newname)); /iterate; /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft