skip to Main Content

How can I upload a file to the server without space limit? I want to find out the code sequence in HTML and Javascript / PHP. I only use NGINX. Can there be a setting in NGINX that limits my upload (if so, how to disable it)?

2

Answers


  1. Disabling a web server upload limit is a bad idea – it would mean anyone can take your website down with a single line of code mimicking uploading a billion terabyte file. You can however adjust the upload size in your php.ini file under upload_max_filesize. You can also change the client_max_body_size entry in your nginx.conf.

    Login or Signup to reply.
  2. client_max_body_size

    NGINX has a setting that can limit the upload size of files. In your NGINX configuration, you can use client_max_body_size to set the max body size of incoming requests. Setting it to 0 disables it.

    server {
        client_max_body_size 0;
    }
    

    There is more information available here: http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search