From 61925b67e489287df02ecf4439f19eea579c8ebd Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 24 Oct 2016 21:15:32 -0400 Subject: [PATCH] show error messages for invalid files --- client/modules/IDE/actions/uploader.js | 6 ++---- client/modules/IDE/components/FileUploader.js | 9 +++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/client/modules/IDE/actions/uploader.js b/client/modules/IDE/actions/uploader.js index c177ae51..fa8229e8 100644 --- a/client/modules/IDE/actions/uploader.js +++ b/client/modules/IDE/actions/uploader.js @@ -34,7 +34,6 @@ export function dropzoneAcceptCallback(file, done) { // for text files and small files // check mime type // if text, local interceptor - console.log(file.type); if (file.type.match(textFileRegex)) { localIntercept(file).then(result => { file.content = result; // eslint-disable-line @@ -88,7 +87,7 @@ export function dropzoneSendingCallback(file, xhr, formData) { export function dropzoneCompleteCallback(file) { return (dispatch, getState) => { // eslint-disable-line - if (!file.type.match(textFileRegex)) { + if (!file.type.match(textFileRegex) && file.status !== 'error') { let inputHidden = '