title: Python, Django: getting full path from file
body: <p>Good evening,</p>
  <p>I'm trying to select a file (&quot;example.csv&quot;) via a <em>input</em> inside my template:</p>
  <p><strong>main.html</strong></p>
  <pre><code>...
  &lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
      {% csrf_token %}
      &lt;input type=&quot;file&quot; name=&quot;myFile&quot;&gt;
      &lt;button class=&quot;btn btn-success&quot; type=&quot;submit&quot;&gt;Choose&lt;/button&gt;
  &lt;/form&gt;
  ...
  </code></pre>
  <p>After selecting and hitting the button I want to achieve the full path plus the name of the file itself as a string!</p>
  <p><strong>views.py</strong></p>
  <pre><code>...
  if request.method == 'POST' and request.FILES['myFile']:
      myFile = request.FILES['myFile']
      file_path = # getting the full file path
  ...
  </code></pre>
  <p><strong>For example:</strong></p>
  <ul>
  <li>data_name = 'example.csv'</li>
  <li>file_path = 'C:\Users\John Doe\Files'</li>
  </ul>
  <p>So the string should look something like this: <strong>'C:\Users\John Doe\Files\example.csv'</strong></p>
  <p>I tried it with <em>os.path</em>, but this doesn't seem to work or I'm doing something wrong here!?</p>
  <p>Thanks for all your help!</p>