Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Preconfiguration "PmaWebDir - Uploading files from Web client to server"

The preconfiguration creates an object of the PmaWebDir type.

New PmaWebDir object. It contains the scripts in the onPageModify event for creating the file upload html page. And in the onPageAction event for processing and saving the received file.

In the dymanic html page, in the onPageModify event it is possible to define what type of file can be sent by the client and whether the client can send multiple files.

For example: Allow sending multiple files of the png, jpg and jpeg types. Then the corresponding row in the code most be modified as follows:

<input id="fileupload" name="myfile" type="file" accept=".png,.jpg,.jpeg" multiple/>
These configurators can be set before the preconfiguration is created:
The name of created objectName of the object created in the tree of Pma objects. The maximum name length is 30 characters. This is a system name, so it must contain only alphanumeric and must not contain any diacritics, empty string, spaces and the first character must not be a number.
Default: "Upload".
Example:
Script in the onButtonUp event of the PmgButton object that opens the upload.htm page of the PmaWebDir object for selecting and sending the file to server.
JavaScriptSelect and copy to clipboard

Pm.CreateView(pMe.PmPanel, "/Web/Upload", "file:upload.htm", "target:_blank;").Open();
See also:

History:
Pm9.00.15: Created
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice