如何上传多个文件到Nginx?

时间:2018-07-11 11:18:31

标签: nginx nginx-location

我想在nginx上保存多个文件,我使用脚本执行保存一个文件(以下代码)。我想发送包含多个文件的表单以将其保存在服务器上。如何更改脚本?

  location /someurl {
    limit_except POST          { deny all; }

    client_body_temp_path      /www/mydir/images;
    client_body_in_file_only   on;
    client_body_buffer_size    128K;
    client_max_body_size       1000M;

    proxy_pass_request_headers on;

    proxy_set_header Host               $host;
    proxy_set_header X-Forwarded-For    $remote_addr;

    proxy_set_header           X-FILE $request_body_file;
    proxy_set_body             off;
    proxy_redirect             off;
    proxy_pass                 myurl;

   }

0 个答案:

没有答案