debug: console.log upload progress events

This commit is contained in:
Claus Lohmar 2026-07-23 11:01:49 +00:00
parent 5f2cb3dc64
commit 344b3b189f

View file

@ -157,6 +157,7 @@ async function handleUpload(formData) {
xhr.setRequestHeader('X-Session-ID', sessionId);
xhr.upload.addEventListener('progress', (e) => {
console.log('upload', e.loaded, e.total, e.lengthComputable);
if (e.lengthComputable) {
const pct = Math.round((e.loaded / e.total) * 100);
const mb = (e.loaded / (1024**2)).toFixed(0);