я хотел бы сделать так, чтобы предварительный просмотр стал перетаскиваемым и переместился в другое раскрывающееся меню
make img source "" перемещает (перетаскивает) в другую область выпадающего списка
<script>
function handleFiles(files) {
for (let i = 0; i < files.length; i++) {
const file = files[i];
if (!file.type.startsWith('image/')){ continue }
const img = document.createElement("img");
img.classList.add("obj");
img.file = file;
preview.appendChild(img); // Assuming that "preview" is the div output where the content will be displayed.
const reader = new FileReader();
reader.onload = (function(aImg) { return function(e) { aImg.src = e.target.result; }; })(img);
reader.readAsDataURL(file);
}
}```
</script>
Как я могу перейти в другую область после того, как моя картинка находится в предварительном просмотре