dropZone.addEventListener('dragenter', (event) => {
const item = event.dataTransfer.items[0];
const type = item.type;
// Check if the item type matches the filter criteria
if (type === 'image/png' || type === 'image/jpeg') {
// Allow the item to be dropped
dropZone.classList.add('drag-over');
} else {
// Prevent the item from being dropped
event.preventDefault();
}
});