title: Upload multiple files with Tornado Web Server and Nginx
body: <p>I am developing an upload multiple files with Python + Tornado + Nginx Web Server. 
  I have changed the properties of the Nginx server as follows: </p>
  
  <p><strong>client_body_buffer_size 512K; 
  client_max_body_size 500M;</strong> </p>
  
  <p>However, when sending a quantity greater than 3 files, it does not forward the room. 
  What could be happening? </p>
  
  <p>On the internet and even here on Stack Overflow only examples with a single file, or against, creating multiple 
  
  <p>The code is below:</p>
  
  <p><strong>Python</strong></p>
  
  <pre><code>class UploadHandler(tornado.web.RequestHandler):
      def post(self):
          try :
              t = len(self.request.files)+1
              x = 0
              n = 'file'
              while x &lt;= t:
                  nn = self.request.files[n][x]
                  nome_arquivo = nn['filename']
                  output_file = open("my directory/" + nome_arquivo, 'w')
                  output_file.write(nn['body'])
                  x+=1
  
              self.render(
              "sucess.html"
                  )
          except IndexError:
              self.render(
              "sucess.html"
              )
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form enctype="multipart/form-data" method="post" action="/uploads"&gt;
  &lt;input name="descricao" type="text" /&gt; &lt;br&gt;
  &lt;input type="file" name="file" multiple /&gt;
  &lt;input type="submit" value="Send File(s)"&gt;
  &lt;/form&gt;
  </code></pre>