aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/phenotypes
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-15 17:01:25 -0600
committerFrederick Muriuki Muriithi2025-01-15 17:01:25 -0600
commita59f002fb959745603ea65f490ccacb598013fc8 (patch)
treeff916a9e63c3a053a74cbde939125cfb6e61e35c /uploader/templates/phenotypes
parent9d67a6199272513bac957c79fd41627f5370a8ff (diff)
downloadgn-uploader-a59f002fb959745603ea65f490ccacb598013fc8.tar.gz
Provide a means to submit the data.
Currently, it's just a dummy function i.e. does not actually submit the data.
Diffstat (limited to 'uploader/templates/phenotypes')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index 1af3dd0..8de67a0 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -564,14 +564,20 @@
};
};
+ var uploaded_files = new Set();
+ var submitForm = (new_file) => {
+ uploaded_files.add(new_file);
+ if(uploaded_files.size === resumables.length) {
+ //TODO: build up the new form from existing form and uploaded files
+ //TODO: submit the form to appropriate endpoint
+ }
+ };
var uploadSuccess = () => {
return (file, message) => {
console.log("THE FILE:", file);
console.log("THE SUCCESS MESSAGE:", message);
- // TODOS:
- // * Save filename/filepath somewhere
- // * Trigger some function that will run when all files have succeeded
+ submitForm(file.file.name);
};
};