aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-11-12 08:08:38 +0300
committerFrederick Muriuki Muriithi2022-11-12 08:08:38 +0300
commit460b68cbafeb179c8af203b829de3f3337f87078 (patch)
tree6f8a96755d190f43a0d5dd6239408e1c26d43309 /qc_app
parentb735cae93ac8243bc9b07a10549a68330934d9bf (diff)
downloadgn-uploader-460b68cbafeb179c8af203b829de3f3337f87078.tar.gz
Accept plain text (text/plain) files
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/entry.py5
-rw-r--r--qc_app/templates/index.html2
2 files changed, 4 insertions, 3 deletions
diff --git a/qc_app/entry.py b/qc_app/entry.py
index efcaf4e..2c4600d 100644
--- a/qc_app/entry.py
+++ b/qc_app/entry.py
@@ -38,8 +38,9 @@ def errors(rqst) -> Tuple[str, ...]:
(
("Invalid file! Expected a tab-separated-values file, or a zip "
"file of the a tab-separated-values file."),)
- if text_file.mimetype
- not in ("text/tab-separated-values", "application/zip")
+ if text_file.mimetype not in (
+ "text/plain", "text/tab-separated-values",
+ "application/zip")
else tuple())
return (
diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html
index 312a876..74e4694 100644
--- a/qc_app/templates/index.html
+++ b/qc_app/templates/index.html
@@ -35,7 +35,7 @@
<fieldset>
<label for="file_upload" class="form-col-1">select file</label>
<input type="file" name="qc_text_file" id="file_upload"
- accept="text/tab-separated-values, application/zip"
+ accept="text/plain, text/tab-separated-values, application/zip"
class="form-col-2"/>
</fieldset>