diff --git a/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte b/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte index 2c07048..ee8843e 100644 --- a/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardUploadCard.svelte @@ -22,6 +22,15 @@ const dashAnimationStop = () => { clearInterval(dashAnimationInterval); }; + + type Dropped = { + accepted: Array; + rejected: Array; + }; + + const onFileDrop = (dropped: Dropped) => { + console.log(dropped); + };
@@ -36,7 +45,7 @@ multiple={false} maxSize={filetype == 'PDF' ? 100_000_000 : 10_000_000} accept={filetype == 'PDF' ? 'application/pdf' : 'application/octet-stream'} - on:filedrop={null} + on:filedrop={(e) => onFileDrop(e.detail.files)} on:filedragenter={dashAnimationStart} on:filedragleave={dashAnimationStop} >