Files should be uploaded to the database immediately after the user selects the file to upload and closes the Open file dialog box.