Spaces:
Running
Running
File size: 1,023 Bytes
f218e1e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
function submitForm() {
var fileInput = document.getElementById('csvFile');
var processingMsg = document.getElementById('processingMsg');
if (fileInput.files.length === 0) {
alert('Please select a CSV file.');
return;
}
var formData = new FormData();
formData.append('csvFile', fileInput.files[0]);
// Show processing message
document.getElementById('uploadForm').classList.add('hidden');
processingMsg.classList.remove('hidden');
// Simulate backend processing (replace with actual AJAX call)
setTimeout(function() {
// After processing (simulated with setTimeout), show success message
processingMsg.innerHTML = '<p>File processed successfully. <a href="#" onclick="downloadProcessedFile()">Download processed file</a></p>';
}, 2000);
}
function downloadProcessedFile() {
// Here you can add code to download the processed file
alert('Downloading processed file...');
// Replace this alert with your actual download logic
}
|