0

I have a node.js server behind an Nginx reverse proxy. The node.js app has an endpoint to receive a file upload using busboy. As the file is uploaded I would like to track progress. However, Nginx I believe buffers it, so my app receives the file all at once. How can I make it so that my node app receives the packets as soon as possible? I have tried setting the following in my nginx.conf file:

http {
   ....
   proxy_busy_buffers_size 0;
}

and

http {
   ....
   proxy_buffering off;
}
Bryn
  • 49
  • 6
  • most http clients track total byte to be send and current byte sended. You can look your http client for this. – AnonyMouze Aug 07 '20 at 03:02
  • The problem isn't that I dont know how to track the progress. The problem is that nginx holds onto the data, then forwards it once its received it all. - So say its a 50MB file that will take 5:00 minutes. The server will report 0% uploaded, until 4:59 when it will jump to 100%. – Bryn Aug 07 '20 at 15:13

1 Answers1

0

In the documentation it covers this. set proxy_request_buffering off; In my case, I set it has follows

location / {
   ...
   proxy_request_buffering off;
   ...
}


Bryn
  • 49
  • 6