title: Django uploading/downloading multiple files
body: <p>Using Django 2.0</p>
  
  <p>What i'm trying to do is post a link for each file uploaded. But my problem is that when I upload multiple files, the field only takes the last one.</p>
  
  <p>So long I have tried this:</p>
  
  <p>In my CBV</p>
  
  <pre><code>def post(self, request, *args, **kwargs):
          form_class = self.get_form_class()
          form = self.get_form(form_class)
          files = request.FILES.getlist('Resource_file')
          if form.is_valid():
              for f in files:
                  f.save()
              return self.form_valid(form)
          else:
              return self.form_invalid(form)
  </code></pre>
  
  <p>in my forms.py</p>
  
  <pre><code>Resource_file = forms.FileField(
          widget=forms.FileInput(attrs= {
              "multiple": True,
          }
          ),
          required = False
      )
  </code></pre>
  
  <p>for example 6 files were uploaded and saved on my media root yet only <a href="https://i.stack.imgur.com/dSEuu.png" rel="nofollow noreferrer">one</a> is related with the field...</p>
  
  <p>How can I save multiple files and display each one on my template?
  Extra: How can I verify the file extension when displaying them on my template? I would like to make like an icon for each type of file.</p>