Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +8 -0
templates/index.html
CHANGED
@@ -369,6 +369,14 @@
|
|
369 |
function handleDrop(e) {
|
370 |
const dt = e.dataTransfer;
|
371 |
const file = dt.files[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
handleFile(file);
|
373 |
}
|
374 |
|
|
|
369 |
function handleDrop(e) {
|
370 |
const dt = e.dataTransfer;
|
371 |
const file = dt.files[0];
|
372 |
+
|
373 |
+
// Create a new DataTransfer object and add the file
|
374 |
+
const dataTransfer = new DataTransfer();
|
375 |
+
dataTransfer.items.add(file);
|
376 |
+
|
377 |
+
// Set the files property of the input element
|
378 |
+
document.getElementById('imageUpload').files = dataTransfer.files;
|
379 |
+
|
380 |
handleFile(file);
|
381 |
}
|
382 |
|