New file generator: "base64"

Mechanic's file generators, used in both "email" and "ftp" actions, now support supplying arbitrary data when pre-encoded in base64. This fills the gap that occurred when file data could not be represented as a JSON string, as is the case with most images.

With this update, use this usage to supply an image or other file whose contents cannot be represented in UTF-8:

{% action "email" %}
  {
    "attachments": {
      "helloworld.png": {
        "base64": "iVBORw0KGgoAAAANSUhEUgAAACYAAAAEAQAAAADKInA+AAAAH0lEQVR4nGOIj///7wVDZOBdoQ4G4dCrYWuA7JNiHQ"
      }
    }
    ...
  }
{% endaction %}

Read more