I tryed this (validateFile is a custom action the ai told me to create) but i dont know how to "access" the data form this custom action in the switch step..
custom action is:
function validateFile (args, ctx) {
function validateFile({file}, ctx) { if (file) { if (file.size > 2000000) { ctx.triggerActionEvent("error", "Datei ist größer als 2MB"); } else if (!file.type.match('image/jpeg|image/png')) { ctx.triggerActionEvent("error", "Nur Bild-Datein erlaubt"); } else { ctx.triggerActionEvent("success", "Datei hat einen Fehler"); } } }
}