Thanks Jonathan and @jball .
I used the onFileRecieved to upload to webserver/webapps/main/ using event.file.copyTo(). I kept the filename the same (each new upload overwrites the previous) so when I select the button I was able to reference the filename I wanted. Since the database write script was taking place on the button I wasn’t sure how to reference an everchanging filename variable that was created on the fileUpload component and also I didn’t want to accumulate a load of pictures in the webserver folder.
This worked on my test system on my laptop but when I went to try it on the server I get the following error:
Error running action ‘dom.onClick’ on picturetest@D/root/Button: Traceback (most recent call last): File " ", line 4, in runAction IOError: File ‘webserver/webapps/main/TestPicture1’ doesn’t exist or isn’t a file.
The picture isn’t being located in the Webserver folder. I don’t have direct access to the install folders on the server unlike my test system so will need to speak to IT to see if the file is being generated from the onFileRecieved and if not why not.