aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-06 11:19:00 -0600
committerFrederick Muriuki Muriithi2025-01-06 11:22:38 -0600
commit7c4031b8d82888e32aacea820e701339bf02c724 (patch)
treec026fc4317ae15bff5805f2efd706512beee0209 /uploader/templates
parentdc80c8fbdaa15b8c79a080b405726dae8baf3385 (diff)
downloadgn-uploader-7c4031b8d82888e32aacea820e701339bf02c724.tar.gz
Pass in file object rather than file-input element
To make this reusable even in scenarios where a file-input element does not exist or cannot be updated, pass in the file object itself rather than a file-input element.
Diffstat (limited to 'uploader/templates')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index b88d16a..3c94a43 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -450,8 +450,8 @@
"#finput-phenotype-n"
].forEach((elementid) => {
$(elementid).on("change", (event) => {
- read_first_n_lines(
- event.target,
+ readFirstNLines(
+ event.target.files[0],
10,
[(data) => {
update_preview(