mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
Changed the handleFiles function so it also contains the call for the generateThumbnail function
This commit is contained in:
@@ -18,11 +18,8 @@ uploadContainer.addEventListener("drop", (e) => {
|
||||
const filePath = window.explorer.onFileDrop(files[0])
|
||||
var holdy = filePath + "";
|
||||
if(holdy.endsWith(".mp4") || holdy.endsWith(".mov") || holdy.endsWith(".avi") || holdy.endsWith( ".mkv")){
|
||||
console.log(filePath)
|
||||
|
||||
const files1 = e.dataTransfer.files;
|
||||
handleFiles(files1);
|
||||
generateThumbnail(filePath);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
@@ -61,8 +61,10 @@ function handleFiles(files) {
|
||||
if (files.length > 0) {
|
||||
const file = files[0];
|
||||
if (file.type.startsWith('video/')) {
|
||||
const filePath = window.explorer.onFileDrop(files[0])
|
||||
videoUpload.files = files;
|
||||
fileName.textContent = `Chosen video: ${file.name}`;
|
||||
generateThumbnail(filePath);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user