Upload a file control

Is there a control to replace the jQuery Mobile button that has an .onchange event? It was being used to upload a file. The user would click on it, it would open a file chooser popup in the laptop file system. The user would pick an image file, and the image would appear in a picture box as well as be added to a database (mysql) as a longblob.

This is the code that was in the .onchange event function:

txtGetPicture.onchange = function() {
     //This gets called after the picture is chosen. 
     //Next, let's read start reading it in.
     //The _onload function will be called when that completes.
     reader.readAsDataURL(txtGetPicture.files[0])
}

I tried to use an input control (set to File) - it got the file - then had the user click a button to get the file, etc. However, the input control only got the file name - so no file was uploaded.

This isn’t really an AppStudio question as much as it is a “How do I progam…” question.

You can get some good tips on to do this by asking AppStudio ChatGPT button “How do I input a picture and display it?”