downloadFile
Diese Funktion ermöglicht einen Datei-Download.
Übersicht
action("downloadFile")-
Auszuführende Aktion.
payload(DownloadFileActionPayload)-
Objekt, das das den Inhalt der herunterzuladenden Datei beschreibt.
Beispiel
downloadFile.json
{
"$schema": "https://forms.virtimo.net/5.1.0/schema.json",
"metaData": {
"id": 0,
"version": 0
},
"configuration": {
},
"components": [
{
"type": "container",
"components": [
{
"type": "button",
"label": "Download base64 encoded file",
"onClick": {
"action": "downloadFile",
"payload": {
"base64Encoded": true,
"data": "PG1zZz4KPGNvbnRlbnQ+SGVsbG8gV29ybGQ8L2NvbnRlbnQ+CjwvbXNnPg==",
"fileName" : "testfile.xml",
"mimeType": "application/xml"
}
}
},
{
"type": "button",
"label": "Download textfile",
"onClick": {
"action": "downloadFile",
"payload": {
"fileName" : "testfile.txt",
"data": "Hello World"
}
}
}
]
}
]
}
Eingebettete Vorschau
Keywords: