I'm implementing a basic file upload in my Web-App and try to track the progress of the upload, but it only works if I load the App via HTTP – when I open it with HTTPS it doesn't work.
const formData = new FormData(...);
const xhr = new XMLHttpRequest();
xhr.upload.onprogress = e => {
const progress = Math.ceil(((e.loaded) / e.total) * 100);
...
}
xhr.open('POST', 'https://domain/upload.', true);
xhr.send(formData);
It should return the progress if I loaded the App via HTTPS, but the event isn't even fired.
(Sidenote - maybe important?: I'm using Multer to capture the files in NodeJS)