How to achieve a drag & drop file upload using livewire?

I am trying to achieve a drag and drop file upload like dropzone using livewire (& AlpineJS). I am looking for pointers to that direction. Not found any documentation how to do it. Any help is greatly appreciated.

Inspired by the solution for file upload How to make file upload work?,
I came up with the solution for drag and drop.

wire:drop="$emit(‘file-dropped’, $event)"

on the div where file is to be dropped.

then have a bit of javascript

window.livewire.on(‘file-dropped’, (event) => {

        let files = event.dataTransfer.files;
        let fileObject = files[0];
        let reader = new FileReader();
       reader.onloadend = () => {
                window.livewire.emit('file-upload', reader.result)


Seems to be working. I can now in the component dd the file data. Rest can be done now.