 // Clear previous list
            pdfPreviewContainer.style.display = "none";  // Hide the preview initially

            for (let i = 0; i < files.length; i++) {
                const file = files[i];

                if (file && file.type === "application/pdf") {
                    const reader = new FileReader();

                    reader.onload = function (e) {
                        // Create file name entry and append it to the list
                        const fileItem = document.createElement