Improve handling of file uploads

This commit is contained in:
Andrew Kingston 2023-10-05 19:17:13 +01:00
parent ecd2ed3d07
commit 549ea44245
1 changed files with 5 additions and 5 deletions

View File

@ -207,12 +207,14 @@
const js = await API.csvToJson(csv)
tmpCustomData = JSON.stringify(js)
}
modal.hide()
saveCustomData()
} catch (error) {
notifications.error("Failed to parse CSV")
}
modal.hide()
drawer.show()
}
}
</script>
<div class="container" bind:this={anchorRight}>
@ -262,9 +264,7 @@
Save
</Button>
</div>
<div slot="description">
Provide a JavaScript or JSON array to use as data
</div>
<div slot="description">Provide a JSON array to use as data</div>
<ClientBindingPanel
slot="body"
bind:valid={customDataValid}