I am using the FileSystemAPI window.showDirectoryPicker() to open a directory which is returning a handle to that directory & by using that I can traverse all the files present in that directory.
const dropArea = document.getElementById("drop_zone");
dropArea.onclick = async (evt) => {
const dirHandle = await window.showDirectoryPicker();
// Next lines of code using dirHandle
};
Above piece of code working fine when use clicking on the button which is prompting the user to chose a directory. I want to achieve the same functionality with the drag & drop as well, means instead of clicking & choosing a directory user can drop a directory.
Followed below link but it didn't work for me.
I will appreciate for any help or input on this. Thank you!