function setProgress(pct) {
$('#bar').animate({ width: pct + '%' }, 600);
$('#label').text(pct + '%');
}
// Simulate upload progress
let pct = 0;
const interval = setInterval(function() {
pct += 10;
setProgress(pct);
if (pct >= 100) clearInterval(interval);
}, 500);