 if (result.success) {
                importProgressContainer.innerHTML = '<p>Upload complete!</p>';
                setTimeout(() => {
                    importModalElement.style.display = 'none';
                    location.reload();
                }, 1000);
            } else {
                alert(result.error || 'Failed to import images');
                importProgressContainer.innerHTML = '';
                document.getElementById('import-file-list').innerHTML = '';
                document.get