Handle failed uploads without a defined dataType. Fixes #2333.
Merge branch 'master' into gh-pages