Filename
A file name with extension
Specification
extension
Type:
String or Array.Allowed extension or array of allowed extensions.
nested
Available types:
Type
Specification
array
Provides an array of nested parameters that are shown when the value of the parameter is set (value is not empty).
string
Provides the URL address of an RPC to load the list of nested parameters.
object
Provides a detailed specification of nested parameters.
{
"name": "myFilename",
"type": "filename",
"label": "My Filename",
"nested": "rpc://getNestedFields"
}Examples
File input
When combined with filename parameter, the buffer can be used for a file input dialog.

[
{
"name": "fileName",
"type": "filename",
"label": "File name",
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"semantic": "file:data"
}
]Allowed file extensions
Restrict allowed extensions by adding extension option.

[
{
"name": "fileName",
"type": "filename",
"label": "File name",
"semantic": "file:name",
"extension": ["jpg", "bmp", "png"],
"help": "Only files with the following extensions are allowed: `jpg`, `bmp`, `png`."
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"semantic": "file:data"
}
]Last updated

