mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Improved drag & drop file path search
This commit is contained in:
@@ -5,28 +5,8 @@ const manualBtn = document.getElementById('manualUploadBtn');
|
||||
const videoPreview = document.getElementById('videoPreview');
|
||||
|
||||
|
||||
// Drag & Drop Events
|
||||
uploadContainer.addEventListener('dragover', (e) => {
|
||||
e.preventDefault();
|
||||
uploadContainer.classList.add('dragover');
|
||||
});
|
||||
|
||||
|
||||
uploadContainer.addEventListener('dragleave', () => {
|
||||
uploadContainer.classList.remove('dragover');
|
||||
});
|
||||
|
||||
|
||||
uploadContainer.addEventListener('drop', (e) => { e.preventDefault();
|
||||
const file = e.dataTransfer.files[0]; // Pfad der Datei
|
||||
const filePath = file.path;
|
||||
console.log('Pfad:', filePath); // ggf. an den Hauptprozess senden, wenn nötig
|
||||
window.electronAPI?.sendDropPath?.(filePath);
|
||||
|
||||
const files = e.dataTransfer.files;
|
||||
handleFiles(files);
|
||||
});
|
||||
|
||||
|
||||
manualBtn.addEventListener('click', () => {
|
||||
fileInput.click();
|
||||
|
||||
Reference in New Issue
Block a user