Reporting error in case connection gets lost during upload with XHR uploader instead of assuming successful upload. See #240 and #499.