Remove the temporay upload form in a setTimeout call. Closes #2267.

Fixed JSLint validity.