From 55f8113cf61f507ba4cc273fa5b714591757c835 Mon Sep 17 00:00:00 2001 From: Linda Paiste Date: Sun, 11 Jun 2023 17:01:25 -0500 Subject: [PATCH] append DOM element instead of replacing HTML --- client/modules/IDE/actions/uploader.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/modules/IDE/actions/uploader.js b/client/modules/IDE/actions/uploader.js index 5a300179f1..1b51156ddd 100644 --- a/client/modules/IDE/actions/uploader.js +++ b/client/modules/IDE/actions/uploader.js @@ -73,7 +73,6 @@ export function dropzoneAcceptCallback(userId, file, done) { file.custom_status = 'ready'; // eslint-disable-line file.postData = response.data; // eslint-disable-line file.s3 = response.data.key; // eslint-disable-line - file.previewTemplate.className += ' uploading'; // eslint-disable-line done(); }) .catch((error) => { @@ -108,7 +107,9 @@ export function dropzoneCompleteCallback(file) { (!file.name.match(TEXT_FILE_REGEX) || file.size >= MAX_LOCAL_FILE_SIZE) && file.status !== 'error' ) { - let inputHidden = '`; - document.getElementById('uploader').innerHTML += inputHidden; + input.setAttribute('value', window.btoa(jsonStr)); + document.getElementById('uploader').appendChild(input); const formParams = { name: file.name,