I'm sending a fairly large file via express in a little node app of mine. As the file is so large, I send the file in a stream.
On the receiving node app that is downloading the file, I would really like the ability to track the progress of the download.
This SO question uses the 'content-length' header to determine how big a file is. However after a little more research, it seems that when streaming a file the content-length cannot be known ahead of time.
Is there something obvious I'm missing here? I'm a bit surprised that there is no way to know how big a file being streamed is before it's finished downloading...