HttpFormDataParse - method of the Pm object
Description:
Parsing data from uploaded files or values in the form of multipart/form-data.
Syntax:
PmArray HttpFormDataParse(Object oData)
Parameters:
oData | (Object) The PmBuffer object containing data regarding the file(s) uploaded by client. |
---|
Return value:
Returns an array (
PmArray) of
PmMap objects in the following structure:
PmMap.Type =
Type (text/plain, application/x-zip-compressed, image/jpeg, ...)
PmMap.Value =
Text or binary data of the file
Note:
The HTML form can send data by the POST method to the server in a simple text form
application/x-www-form-urlencoded, e.g. "Name1=Value1&Name2=Value2 ...", where the individual values can then be read by
Pm.HTTPGetFormValue.
The HTML form can also send the data by the POST method to the server in a complex binary form
multipart/form-data, that may contain text values together with binary data and files. The raw data in the form of the
PmBuffer object can then be processed by the
Pm.HttpFormDataParse method.
The method should facilitate the work with HTML forms because it removes manual decoding of received data.
This method
is not functional in
Web panels.
Example1:
An array of maps containing data from files uloaded by client.
JavaScriptVBScriptSelect and copy to clipboard
var aParts = Pm.HttpFormDataParse(oData);
Dim aParts
aParts = Pm.HttpFormDataParse(oData)