且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

nginx 文件使用 proxy_pass 上传流

更新时间:2022-05-06 23:43:10

没有办法(至少目前是这样).在 nginx 开始将其发送到上游之前,将始终缓冲完整请求.要跟踪上传的文件,您可以尝试上传进度模块.

There is no way to (at least as of now). Full request will be always buffered before nginx will start sending it to an upstream. To track uploaded files you may try upload progress module.

更新:在 nginx 1.7.11 中,proxy_request_buffering 指令可用,它允许禁用请求正文的缓冲.不过应该小心使用,请参阅文档.

Update: in nginx 1.7.11 the proxy_request_buffering directive is available, which allows to disable buffering of a request body. It should be used with care though, see docs.