title: django - how to post array of images to views
body: <p>i am stuck on this issue since yesterday. i have a form where user can select more image files and submit. now i am not able to catch those <code>POSTED</code> image files in my views.py. </p>
  
  <p>my html: </p>
  
  <p><code>&lt;input type="file" name="images[]" /&gt;</code>
  <code>&lt;input type="file" name="images[]" /&gt;</code></p>
  
  <p>and in my views.py i did this: </p>
  
  <p><code>images = request.POST.getlist('images[]')</code> </p>
  
  <p>but once i <code>print images</code>, i am getting <code>[]</code>, empty array. what am i doing wrong? i want to get all selected image files and save them into db in my view. </p>
  
  <p><strong>EDIT:</strong><br>
  this is my html:</p>
  
  <pre><code>&lt;form action="/save/" method="post" enctype="multipart/form-data"&gt; 
   &lt;input type="file" name="images[]" /&gt; 
   &lt;input type="file" name="images[]" /&gt;
  &lt;input type="submit" value="send" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>this is my views.py</p>
  
  <pre><code>fotos = request.POST.getlist('images[]')
  for i in range(len(fotos)):
    print fotos[i]
  </code></pre>
  
  <p>here it is printing <code>[]</code>, and not the names of each images. why is this array empty? </p>
  
  <p>thanks for help. </p>