Component Palette Icon:

On this page ...


The File Upload component allows users to upload files to the Gateway or other locations from a Perspective session using a script action on the onFileReceived component event. For an example, see Download and Upload Files page. 

The component has different appearances based on its width. When initially dragged onto your View, a Browse button will be visible and paired with "Drag files here" text. At smaller widths, the component defaults to a simple cloud icon and no text. This icon can be changed using the fileUploadIcon property settings.


Properties

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective.
This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
maxUploads

The maximum number of concurrent (simultaneous) uploads to allow. Default is 5.

value: integer
supportedFileTypesAn array of string values, indicating what file types are allowed to be uploaded. Example values are "pdf" or "txt".array
fileSizeLimitSpecifies the maximum size of each uploaded file, in megabytes (MB). Default is 10 MB.value: integer
style

Sets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.  

object

fileUploadIcon

Determines the icon used when the File Upload component is small.

NameDescription Property Type
pathShorthand path to icon source, in format: library/iconName (i.e., material/arrow_right). The materials icon library is the default source for icons in Ignition. See  https://fonts.google.com/icons?selected=Material+Icons.value: string
colorColor of the icon. Here for convenience, may instead assign 'fill' in the styles property. Can be chosen from color wheel, chosen from color palette, or entered as  RGB  or  HSL  value.  See  Color Selector.color
object


Scripting

See the Perspective - File Upload Scripting page for the full list of scripting functions available for this component.



  • No labels