st formData = new FormData();
        formData.append('fileInput', file);
        
        if (certInput.files.length > 0) {
            formData.append('certFile', certInput.files[0]);
        }
        try {
            const response = await window.fetchWithCsrf(e.target.action, {
                method: 'POST',
                body: formData
            });
            
            const fileResults = await response.json();
            fileResults.forEach(result => {
                result.fileName = fi