generated from Klectr/KTemplate
limit types of files to import
This commit is contained in:
parent
4dcea1a42a
commit
2ed58cbee6
@ -10,6 +10,8 @@ export function ImportButton() {
|
|||||||
function _handleImport() {
|
function _handleImport() {
|
||||||
const input = document.createElement('input')
|
const input = document.createElement('input')
|
||||||
input.type = 'file'
|
input.type = 'file'
|
||||||
|
input.accept = ".json"
|
||||||
|
input.multiple = false
|
||||||
input.onchange = (e: any) => {
|
input.onchange = (e: any) => {
|
||||||
const file = e.target.files[0]
|
const file = e.target.files[0]
|
||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
|
Loading…
Reference in New Issue
Block a user