The trigger is the click of the SEND Button. I check ther FormVariable that is shown in the Behaviors panlel under the Upload.
I check if its JPG, PNG, GIF etc. like it is in the code above.
the file-size is checked but not the extension.
what else then the sourcecode should i post?