This method can be called to process a form submission for an HTML form
with encoding type "multipart/form-data". Such a form can have a mixture
of "regular" HTML form fields and also file uploads.
Form fields are available via
get(Object) without calling this method.
Uploaded files still need to be processed via the passed callback function.
This callback function is called for each file upload part in the request.
The parameters are the field name, the content type and the original file
name. The function can return either a null, which means that the upload
of this part should be skipped, or return a dw.io.File instance. If the
file is an existing directory the system will automatically generate a
unique file name. If the file is not an existing directory the uploaded
content will be directly stored into that file. An existing file with the
same name will be deleted. If the file can't be deleted for whatever reason,
the upload is stored with a generated unique file name in the indicated directory.
An automatically generated file name consists of the the prefix "upload",
a time stamp, a unique id and the extension tmp. For example:
"upload_20070114221535_bc7H1aOadI9qYaaacovPd3lqna.tmp".
var params : HttpParameterMap = pdict.CurrentHttpParameterMap;
// Get the file name from the first field. This is works because the
// parameter map is updated before the file part is parsed.
var files : LinkedHashMap = params.processMultipart( (function( field, ct, oname ){
return new File( File.IMPEX + "/" + params.firstField );
}) );
Parameters:
callback
-
a callback function, which takes the field name, content type and original file name as input