Upload Capability of the Requester (Magic xpa 3.x)
The Internet requester lets you design an HTML page on which you can enable a file to be uploaded and then received by a Magic xpa program.
To enable this you should define your HTML file as follows:
-
The form method attribute type must be POST. For example:
<form action=/scripts/MGrqispi.dll method=post>
-
The form tag should include the following attribute: ENCTYPE="multipart/form-data"
For example:
<form action=/scripts/MGrqispi.dll method=post ENCTYPE="multipart/form-data">
-
You should add to the form an Input tag of type: FILE. This tag creates both an edit box in which the user can enter the local path and file name, and a push button allowing the user to browse to select the file.
This input tag should be identified by a clearly defined name.
For example:
<input type=file name="MyFile">
-
The given name of the file input tag should be added to the hidden input of the arguments.
For example:
<input type=hidden name="ARGUMENTS" value="var1,var2,....,MyFile,...varn">
-
A corresponding BLOB virtual variable should be created in the called Magic xpa program. This variable is updated with the uploaded file content.
The variable's content can be converted to a physical file on the server side using the Blb2File function.