RMP_FileUpload
For File Upload widgets, all functions in Common_Functions_AllWidgets are available, except for the following:
- getTooltip
- setTooltip
- setValue
Methods
browse()
Opens a file explorer window to select files for an upload.
deleteSelected()
Deletes all selected files. Note that this method does not work for File Upload widgets inside an array.
deselectFile(name)
Deselects a file by its name. Note that this method does not work for File Upload widgets inside an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| name | string | Name of the file |
deselectFileId(id)
Deselects a file by its ID. Note that this method does not work for File Upload widgets inside an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| id | string | Identifier of the file |
downloadSelected()
Downloads all selected files. Note that this method does not work for File Upload widgets inside an array.
getBrowseButton() → {SVGElement}
Returns the element corresponding to the Upload icon.
Returns: SVGElement
getType() → {string}
Returns the type of the widget (RMP_FileUpload).
Returns: string
getUploadedCount() → {number}
Returns the number of files that have been uploaded, or -1 if inside an array.
Returns: number
refresh()
Refreshes the uploaded files list. Note that this method does not work for File Upload widgets inside an array.
selectFile(name)
Selects a file by its name. Note that this method does not work for File Upload widgets inside an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| name | string | Name of the file |
selectFileId(id)
Selects a file by its ID. Note that this method does not work for File Upload widgets inside an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| id | string | Identifier of the file |