AMT Help Files

File uploader

Description:

The File uploader object can be used to upload a file from the end user to a specified location by the AMT FileController. This control can be used in both the web client and AMT Screens.

The File uploader object consists of a readonly editbox together with a button, pressing the button will open a file select window. After selecting a file, the editbox will display the file name and the button will display a cross. Pressing the (cross)button after having selected a file, will clear the 'File uploader'.
Selecting a file will set the HasFile property to true, indicating that a file was loaded into the 'File uploader'. This allows the file to be uploaded to a specific location with the Save function. The value of the File uploader object will hold the file name of the loaded file, this value can be modified to change the file name before saving the file.


The file path is not included in the value of the File uploader, regardless of the AMT client.

The save function does not allow full paths, only paths relative to the directory set in the Uploads Basepath in the Control Center.
In code a configuration parameter can be used to refer to the upload directory: lion.var-param.upload-path   


Remarks:

 

Examples:

Example A:

if FileUploader_0.HasFile
     FileUploader_0.Save ('.\', false)
endif


Example B:

if FileUploader_1.HasFile
   target := SI-NTLogin + '\' + today.CCYYMMDD + '-' + FileUploader_1
   FileUploader_1.SAVE (target ,false)
   UploadedFile := lion.var-param.upload-path & target
endif

Toolbar button icon:

 

Properties:

 

Events:

There are no events for this layout object.

 

Dynamic properties:

 

Functions: