Improved drag & drop file path search

This commit is contained in:
2025-11-05 17:37:52 +01:00
parent 99c8bea0be
commit ea1f13f8c4
4 changed files with 29 additions and 24 deletions
+21
View File
@@ -1 +1,22 @@
const dropzone = document.getElementById("uploadContainer");
dropzone.addEventListener("dragover", (e) =>{
e.stopPropagation();
e.preventDefault();
});
dropzone.addEventListener("drop", (e) => {
e.stopPropagation()
e.preventDefault()
const files = e.dataTransfer.files
const filePath = window.explorer.onFileDrop(files[0])
var holdy = filePath + "";
if(holdy.endsWith(".mp4")){
console.log(filePath)
const files1 = e.dataTransfer.files;
handleFiles(files1);
}
})