{
  "meta": {
    "$_POST": [
      {
        "type": "text",
        "name": "imageData"
      }
    ]
  },
  "exec": {
    "steps": [
      {
        "name": "decodedImage",
        "module": "core",
        "action": "setvalue",
        "options": {
          "value": "{{$_POST.imageData.replace(/^data:image\\/\\w+;base64,/, \"\")}}"
        },
        "meta": [],
        "outputType": "text",
        "output": true
      },
      {
        "name": "saveSignatureBinary",
        "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"
      }
    ]
  }
}