Select function sets uploadedDir hidden form field and clicks the file
input button for user. Submit function is automatically triggered when
files value changes, which then shows the loading screen and submits the
form. preventDefault is also needed here.