DockerERTFF/app/api/uploadSignature.json

61 lines
1.2 KiB
JSON

{
"meta": {
"$_POST": [
{
"type": "text",
"name": "image"
}
]
},
"exec": {
"steps": [
{
"name": "decodedImage",
"module": "core",
"action": "setvalue",
"options": {
"key": "image",
"value": "image.replace(/^data:image\\/\\w+;base64,/, \"\")"
},
"meta": [],
"outputType": "text"
},
{
"name": "upload",
"module": "upload",
"action": "upload",
"options": {
"fields": "{{decodedImage}}",
"path": "/public/signatures/Sig_{{NOW.timestamp}}.png"
},
"meta": [
{
"name": "name",
"type": "text"
},
{
"name": "path",
"type": "text"
},
{
"name": "url",
"type": "text"
},
{
"name": "type",
"type": "text"
},
{
"name": "size",
"type": "text"
},
{
"name": "error",
"type": "number"
}
],
"outputType": "text"
}
]
}
}