How to call s3 upload from JavaScript function?

It's a pleasure..
I need your help in two related things if you may:
1/ I want to call the s3 upload function from inside of an existing javascript file. I want to somehow use something like dmx.parse('s3upload.upload()"') and pass the files that's dropped into an html canvas. which I don't know how to do it.
2/ I want then to enable the users to download them onto the canvas so they can work on them within the canvas.
Thanks in advance

Can you explain a little more?
Maybe show some screenshots/code of what you have?

That will help to replicate and give some answer :slight_smile:

Thanks for trying to help, franse
In a javascript function I have the following:

canvas.on('drop', function (event) {
    event.e.stopPropagation();
    event.e.stopImmediatePropagation();
    event.e.preventDefault();
    let files = [...event.e.dataTransfer.files];
    // here I want to trigger the s3 upload function and pass the files arrays 
})

Have you tried creating a page flow and adding the S3 call using Wappler and see how the expression is made?