Why submit button gets stuck on "Please wait..." after uploading a file to the form?