limit types of files to import

This commit is contained in:
Triston Armstrong 2024-10-07 00:54:50 -04:00
parent 4dcea1a42a
commit 2ed58cbee6

View File

@ -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()