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. |
Remarks:
- Files to be uploaded may not be empty.
- The 'File uploader' is intended to upload files up to 5 MB, larger files may impact the performance of your AMT
environment.
- The AMT Blazor WebClient a maximum data upload limit is set to 10 MB by default. This can be increased by changing the MaxRequestLength setting to a higher value in the appsettings.json file. See MaxRequestLength.
Examples:
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:
- 3D
- BorderStyle
- Color
- Description
- Enabled
- Font
- Height
- HelpText
- Left
- Name
- Parent
- TabNumber
- TabStop
- Top
- UpperCase
- Visible
- Width
- ZOrder
Events:
There are no events for this layout object.
Dynamic properties:
- Color
- Enabled
- FontBold
- FontColor
- FontItalic
- FontName
- FontSize
- FontUnderline
- HasFile
- HelpText
- Left
- ReadOnly
- Top
- Visible
Functions: