about summary refs log tree commit diff
path: root/uploader
diff options
context:
space:
mode:
Diffstat (limited to 'uploader')
-rw-r--r--uploader/static/js/files.js3
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html4
2 files changed, 3 insertions, 4 deletions
diff --git a/uploader/static/js/files.js b/uploader/static/js/files.js
index 26092f7..9d6bca1 100644
--- a/uploader/static/js/files.js
+++ b/uploader/static/js/files.js
@@ -1,5 +1,4 @@
-var readFirstNLines = (fileelement, count, process_content_fns) => {
-    var thefile = fileelement.files[0];
+var readFirstNLines = (thefile, count, process_content_fns) => {
     var reader = new FileReader();
     if(typeof thefile !== "undefined" && thefile !== null) {
         reader.addEventListener("load", (event) => {
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(