File component can be used to upload files. In comparison to the
guiUpload functionality, there are several differences.
Filecomponent does not block the user interface during upload. It also does not trigger an event in the back-end.
- For deployed applications, the file is uploaded to the webserver instead of being part of the submission data. This makes the
Filecomponent suitable for uploading larger files.
There are two modes of operation:
- base64: In base64 mode, the selected files are base64 encoded and put in the submission data. This is the default mode for local applications.
- portal: In portal mode, the selected files are uploaded to the portal webserver. Download URLs are provided in the submission data. This is the default mode for deployed applications.
File component also offers upload capabilities for a number of cloud storage services. These are not facilitated yet.
In addition to the properties and methods listed below, this component inherits properties and methods from the superclass
Component. For example, any File component has a
tooltip property even though these are not explicitly listed here.
|Display the uploaded file as image.
|Display size for uploaded images.
|Pattern or MIME type for allowed file types.
|Whether the uploaded file can be downloaded from the
[payload, filePaths] = File.storeUploadedFiles(metaData, payload, key, Parent=parent, NestedForm=nestedForm)
|Use the submission data to save the files in the back-end and provide the local file paths as output1.
|Use base64 mode in deployed mode.
ResultFilefor downloading files.
The files are saved in the session folder. This folder is removed when the application is closed.