debug: add progress/loadstart console.logs
This commit is contained in:
parent
4428d91feb
commit
0f69e725a5
1 changed files with 2 additions and 0 deletions
|
|
@ -152,6 +152,7 @@ async function handleUpload(formData) {
|
|||
xhr.setRequestHeader('X-VM-Name', vmName);
|
||||
|
||||
xhr.upload.addEventListener('progress', (e) => {
|
||||
console.log('progress', e.loaded, '/', e.total, 'computable:', e.lengthComputable);
|
||||
if (e.lengthComputable) {
|
||||
const pct = Math.round((e.loaded / e.total) * 100);
|
||||
setPhase('Uploading source file... ' + (e.loaded / (1024**3)).toFixed(1) + ' GiB', pct, false);
|
||||
|
|
@ -162,6 +163,7 @@ async function handleUpload(formData) {
|
|||
});
|
||||
|
||||
xhr.addEventListener('loadstart', () => {
|
||||
console.log('loadstart');
|
||||
setPhase('Uploading source file...', 0, true);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue