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