Usage Canvas function in Apliqo UX

I tried to use the canvas file upload function (tm1-ui upload) inside an Apliqo UX App (Snippet). The documentation states that a function can be called using the tm1-after-upload attribute.
I tried to put it into the customfunctions class but that didn’t work.

I think the documentation is also for Canvas only and not applicable for Apliqo:
Upload files and images - Cubewise CODE

So my question is where and how would I generally register JS Functions which can be accessed by HTML Snippets / Canvas.

Snippet code

<tm1-ui-upload 
    tm1-instance="UX_Demo" 
    tm1-after-upload="$ctrl.CustomFunctions.fileUploaded(file)">
</tm1-ui-upload>

custom-functions.service.js

fileUploaded(file) { 
     console.log("FILE UPLOADED CUSTOMFUNCTIONS", file.path, file.name, file.instance )
}