I have a webview made with React. I would like to implement a drag-and-drop thing, to allow dropping files from the vs-code explorer onto my webview.
So, in my react code I did a onDrop function, where I call:
<code>event.preventDefault();
console.log(event);
</code>
<code>event.preventDefault();
console.log(event);
</code>
event.preventDefault();
console.log(event);
The thing is, nowhere in the logged event do I find any mention of my dropped file uri (./todos.json or similar). How can I access that?
Comparing with dropping files from “finder” ie macs folders which works great. For those case I can find data in:
<code>event.dataTransfer.files
</code>
<code>event.dataTransfer.files
</code>
event.dataTransfer.files
But that one (and even event.nativeEvent.dataTransfer) is empty when dropping from vs-code’s explorer.
Any ideas? What I can try here?