From eae22a2e040dd15b839c9baf0bdb88d1fdd550c2 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Fri, 13 Nov 2015 16:04:55 +0100 Subject: [PATCH] Move logging of upload errors to be before cancellation of uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Although logging isn’t affected by the cancelation of uploads, it may cause confusion for readers if the uploads are cancelled before the error is logged. --- js/components/ascribe_uploader/react_s3_fine_uploader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index 95e0fffe..e3adef58 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -457,13 +457,13 @@ let ReactS3FineUploader = React.createClass({ }, onError(id, name, errorReason) { - this.cancelUploads(); - console.logGlobal(errorReason, false, { files: this.state.filesToUpload, chunks: this.state.chunks }); + this.cancelUploads(); + let notification = new GlobalNotificationModel(errorReason || this.props.defaultErrorMessage, 'danger', 5000); GlobalNotificationActions.appendGlobalNotification(notification); },