express multer node.js upload xmlhttprequest

xhr uploading progress while using expressjs multer

I am trying to use XHR to track uploading progress, but at my onprogress callback at I only getting Content-Length from response header instead of uploading file size:

xhr.onprogress = (event) => {
console.log('Progress ' + event.loaded + '/' +;

I use Multer to handle file uploading and seems it is not avaible to handle file uploading by default:

So I tried to handle uploading with progress-stream:

  var p = progress({ time: 1 });
p.on('progress', function() {

But it works same way, I only get onle “Progress…” at log and at XHR onprogress I have only Content-Length value instead of file size value. Help please, I have no idea how to fix it!