title: How to get Filename in DjangoWebApp based on a Model containing FileField?
body: <p>I making a email delivery WebApp, I have an <em><code>Email</code></em> Class with <code>uploadcsvfile</code> to upload the <em><code>.csv</code></em> contact file from the user's computer to server at location <code>CONTACT_DIR</code>, what I'm unable to figure out is how to get the saved <code>contacts_some_char.csv</code> name in my <code>views.py</code>, the purpouse of getting it's name is so that I can parse the email list and send email to them.</p>
  
  <p>I have my <code>model.py</code> as follows :</p>
  
  <pre><code>class Email(models.Model):
      fromemail = models.EmailField(blank = False, max_length = 254)
      uploadcsvfile = models.FileField(upload_to = 'Contacts', blank = False)
      subject = models.CharField(blank=False,max_length = 254)
      bodyHeading = models.CharField(blank = False,max_length = 254)
      bodytext = models.TextField(blank = False)
      name = models.CharField(blank = False,max_length = 254)
  </code></pre>
  
  <p>Here is my <code>views.py</code> :</p>
  
  <pre><code>def index(request):
  
      if request.method == 'POST':
          email_form = EmailForm(request.POST, request.FILES)
          if email_form.is_valid():
              email_form.save(commit = True)
              print(Email.uploadcsvfile)
              contacts = Contacts()
              #path = settings.CONTACT_DIR
              f = open(settings.CONTACT_DIR+"/"+str(uploaded_file_name))
              csv_f = csv.reader(f)
              Emails = []
              Names= []
              L_Names = []
              for x in csv_f:
                  Emails.append(x[0])
                  Names.append(x[1])
                  L_Names.append(x[2])
              f.close()
              contacts.ListOfEmails = json.dumps(Emails)
              contacts.ListOfFirstNames = json.dumps(Names)
              contacts.ListOfLastNames = json.dumps(L_Names)
              contacts.save()
  </code></pre>
  
  <p>Here is <code>forms.py</code> for the same :</p>
  
  <pre><code>from django import forms
  from dcsvreader.models import Email
  
  class EmailForm(forms.ModelForm):
      class Meta():
          model = Email
          fields = "__all__"
  </code></pre>
  
  <p><strong>A.K.A</strong> How do i get <strong><code>uploaded_file_name</code></strong> in <code>views.py</code>, I'm reading in various QnA at S.O that this is related to <em><code>FileDescriptor</code></em> but can't find how exactly also, <em><code>print(Email.uploadcsvfile)</code></em> gives <em><code>&lt;django.db.models.fields.files.FileDescriptor object at 0x03F7DF90&gt;</code></em> as output.</p>