aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-21 10:38:10 -0600
committerFrederick Muriuki Muriithi2025-01-21 10:38:10 -0600
commit1d25a952fac545c5814a3ab9bac087f572248588 (patch)
treeeb04f2eb17edf626016e5d5a688bd4a1fd2f94a3 /uploader/templates
parente7ab5230c69bd3f37e0f6195387155506b7d6ee5 (diff)
downloadgn-uploader-1d25a952fac545c5814a3ab9bac087f572248588.tar.gz
Track what file is uploaded
Provide the related file input's name together with the success message in order to track which uploaded file is related to each of the different file types.
Diffstat (limited to 'uploader/templates')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html8
1 files changed, 3 insertions, 5 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index 8de67a0..9eef50d 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -573,11 +573,9 @@
}
};
- var uploadSuccess = () => {
+ var uploadSuccess = (file_input_name) => {
return (file, message) => {
- console.log("THE FILE:", file);
- console.log("THE SUCCESS MESSAGE:", message);
- submitForm(file.file.name);
+ submitForm({...JSON.parse(message), "file-input-name": file_input_name});
};
};
@@ -628,7 +626,7 @@
startUpload($("#" + resumable_element_id + "-browse-button"),
$("#" + resumable_element_id + "-retry-button"),
$("#" + resumable_element_id + "-cancel-button"))),
- uploadSuccess()),
+ uploadSuccess(file_input.attr("name"))),
uploadError());
/** Setup progress indicator **/