Only reject the deferred object if the upload should be prevented. Fixes #2438
Merge branch 'master' into gh-pages
Updated package version.
Merge branch 'master' into gh-pages