I've this code:
app.use(
"/files/*",
serveStatic({
root: resolve(`/app/public`),
rewriteRequestPath: (path) => {
return path.replace(/^\/files/, "");
},
}),
);
For some reason, when I download any of those .zip files it'll not show the total size.
After some research I found that there is NO Content-Length + Transfer-Encoding is set to chunked.
This works fine but I need, yes need, not want, the Content-Length as I need to add a download progress bar and this do not allow me to.
How can we fix this? I've been trying a lot of things but anything seems to work.