Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
logging-scratch-gui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Goessmann
logging-scratch-gui
Commits
fc28a725
Commit
fc28a725
authored
6 years ago
by
Paul Kaplan
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/import-csv.js
+1
-1
1 addition, 1 deletion
src/lib/import-csv.js
with
1 addition
and
1 deletion
src/lib/import-csv.js
+
1
−
1
View file @
fc28a725
...
@@ -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
,
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment