HttpFormDataParse - method of the Pm object

Parsing data from uploaded files or values in the form of multipart/form-data.
PmArray HttpFormDataParse(Object oData)
oData(Object) The PmBuffer object containing data regarding the file(s) uploaded by client.
Return values:
Returns an PmArray of PmMap objects in the following structure:
PmMap.Name = Name
PmMap.File = File name
PmMap.Type = Type (text/plain, application/x-zip-compressed, image/jpeg, ...)
PmMap.Value = Text or binary data of the file
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 the received data.

This method is not functional in Web panels.
An array of maps containing data from files uloaded by client.
JavaScriptVBScriptSelect and copy to clipboard

var aParts = Pm.HttpFormDataParse(oData);
Parsing file data. Script in the onPageAction event of the PmaWebDir object.
JavaScriptVBScriptSelect and copy to clipboard

var oData = pEvent.Data;
if (Pm.GetVarType(oData, 1) == "PmBuffer")
var aParts = Pm.HttpFormDataParse(oData);
var iParts;
for (iParts = 0; iParts < oData.GetSize(1); iParts++)
var mPart = aParts.GetItem(iParts, -1);

Pm9.00.15: Created
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- HttpFormDataParse
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.