= document.getElementById('fileName');
    const photoPreview = document.getElementById('photoPreview');
    const previewImage = document.getElementById('previewImage');

    function updatePreview() {
        const name = nameInput.value.trim();
        const content = contentInput.value.trim();

        if (name || content) {
            previewSection.style.display = 'block';
            previewName.textContent = name || 'Anonymous';
            previewMessage.textContent = content || '';
        } else