Add txt import so file can be imported/exported from symmetrically
This commit is contained in:
1 parent
5ed340c789
commit
fc28a7256d
1 file changed
+1
-1
@@ -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, {
|
||||
|
||||
Reference in new issue
Block a user