Skip to content
Snippets Groups Projects
Commit fc28a725 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Add txt import so file can be imported/exported from symmetrically

parent 5ed340c7
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ import Papa from 'papaparse'; ...@@ -3,7 +3,7 @@ import Papa from 'papaparse';
export default () => new Promise((resolve, reject) => { export default () => new Promise((resolve, reject) => {
const fileInput = document.createElement('input'); const fileInput = document.createElement('input');
fileInput.setAttribute('type', 'file'); fileInput.setAttribute('type', 'file');
fileInput.setAttribute('accept', '.csv, .tsv'); // parser auto-detects delimiter fileInput.setAttribute('accept', '.csv, .tsv, .txt'); // parser auto-detects delimiter
fileInput.onchange = e => { fileInput.onchange = e => {
const file = e.target.files[0]; const file = e.target.files[0];
Papa.parse(file, { Papa.parse(file, {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment