Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ExportDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ExportDatabase extends Component<Props> {
const url = `data:application/json;charset=utf8,${ encodeURIComponent(jsonData) }`;

this.download.setAttribute('href', url);
this.download.setAttribute('download', 'schema.txt');
this.download.setAttribute('download', 'schema.json');
this.download.click();
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ImportDatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class ImportDatabase extends Component<{}> {
const file = e.target.files[0];
const extension = file.name.substr(file.name.lastIndexOf('.'));

if (extension !== '.txt' || file.type !== 'text/plain') {
alert('Please select the exported schema.txt file'); // eslint-disable-line no-alert
if (extension !== '.json' || file.type !== 'application/json') {
alert('Please select the exported schema.json file'); // eslint-disable-line no-alert
// Reset the current file input
e.target.value = null; // eslint-disable-line no-param-reassign
return;
Expand Down Expand Up @@ -70,7 +70,7 @@ class ImportDatabase extends Component<{}> {
id='file-upload'
ref={ (input) => { this.input = input; } }
type='file'
accept='.txt'
accept='.json'
onChange={ this.handleFileUpload }
/>
</li>
Expand Down