Hi,
I'm using a fileButton element to enable the user to upload an image to a S3 bucket. Therefore, I use a script that triggers once the fileButton event "change" is triggered. In the attached picture, you can see the first lines of the script as well as the output in the console.
How is it possible that the fileButton value is empty, even though a file has been selected and hence it should actually show the file contents?
To trigger the uploadSingleFileToS3 function from within a JavaScript query and ensure it completes before proceeding, simply prepend the await keyword directly to the function call. There's no need to wrap the function in an async block!