frontend/src/components/FileUpload.svelte
Philipp Dormann 5b15141ecc
All checks were successful
continuous-integration/drone/push Build is passing
general cleanups
2021-01-04 19:39:57 +01:00

26 lines
606 B
Svelte

<script>
import "filepond/dist/filepond.css";
import FilePond from "svelte-filepond";
let pond;
// pond.getFiles() will return the active files
// the name to use for the internal file input
let name = "filepond";
function handleInit() {
// console.log("FilePond has initialised");
}
function handleAddFile(err, fileItem) {
// console.log("A file has been added", fileItem);
}
</script>
<div class="app">
<FilePond
bind:this={pond}
{name}
server="/api"
allowMultiple={false}
credits={false}
oninit={handleInit}
onaddfile={handleAddFile} />
</div>