Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "FilePicker",
"description": "Lets a user pick one or more files.",
"type": "object",
"examples": [
{
"title": "Pick a file",
"description": "FilePicker opens the OS file chooser and returns {name, size, bytes}. Restrict types with the Extensions list. Multiple: true returns a list of files.",
"document": {
"PresentationType": "Button",
"Text": "Pick a document",
"Icon": "upload",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "FilePicker",
"Extensions": [
"png",
"jpg",
"pdf"
],
"Multiple": false,
"OnSuccess": {
"Handler": "Alert",
"Theme": "Primary",
"Title": "Picked",
"Message": "{{ Value.name }} ({{ Value.size }} bytes)"
}
}
}
}
],
"x-version": "1.0",
"required": [
"Handler",
"Extensions"
],
"properties": {
"Handler": {
"const": "FilePicker"
},
"Multiple": {
"type": "boolean",
"default": false
},
"Extensions": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"OnSuccess": {
"$ref": "/schema/Actions/Action/1.0/index.json"
},
"OnFailure": {
"$ref": "/schema/Actions/Action/1.0/index.json"
}
},
"additionalProperties": false,
"x-icon": "<svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 3h7l4 4v14H7z\"/><path d=\"M14 3v4h4\"/></svg>",
"$id": "/schema/Actions/FilePicker/1.0/index.json",
"x-family": "Actions",
"x-name": "FilePicker",
"x-source-package": "zero-schema"
}
FilePicker opens the OS file chooser and returns {name, size, bytes}. Restrict types with the Extensions list. Multiple: true returns a list of files.
{
"PresentationType": "Button",
"Text": "Pick a document",
"Icon": "upload",
"BorderRadius": 6,
"Color": "#FFFFFF",
"BackgroundColor": "#2F6FED",
"OnClick": {
"Handler": "FilePicker",
"Extensions": [
"png",
"jpg",
"pdf"
],
"Multiple": false,
"OnSuccess": {
"Handler": "Alert",
"Theme": "Primary",
"Title": "Picked",
"Message": "{{ Value.name }} ({{ Value.size }} bytes)"
}
}
}