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

This commit is contained in:
Paul Kaplan committed 2018-12-20 08:43:07 -05:00
1 parent 5ed340c789
commit fc28a7256d
1 file changed
+1 -1
+1 -1
View File
@@ -3,7 +3,7 @@ import Papa from 'papaparse';
export default () => new Promise((resolve, reject) => {
const fileInput = document.createElement('input');
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 => {
const file = e.target.files[0];
Papa.parse(file, {