title: why do I get "FileNotFoundError" when doing fileupload with Django?
body: <p>I am writing a file upload page with Django/Python. I get this error: 
        FileNotFoundError: [Errno 2] No such file or directory: '48.png'. </p>
  
  <p>Here is the relevant part of the view, which handles the upload:</p>
  
  <pre><code>`if request.method == 'POST': 
      form = myform(request.POST, request.FILES)
      if form.is_valid(): 
          print("FORM VALID")
          f = request.FILES['thefile']
          print("f:" + f.name)
          print(pref+'/'+str(f))
          open(f.name, 'rb')
      else:
          print('FORM NOT VALID')
  </code></pre>
  
  <p>Things go wrong in the open(f.name   statement. The form is in a template:</p>
  
  <pre><code>&lt;form method="post" action="/dataset_storage_upload/{{ pk }}/{{pid}}/"      name="submit" enctype="multipart/form-data"&gt;
  {% csrf_token %}
  {{ theForm.as_p }}
  &lt;button type="start_upload" value="Submit"   onclick="document.upload.submit() "&gt;Upload&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this is the form:</p>
  
  <pre><code>class myform(forms.Form):
  thefile = forms.FileField()
  </code></pre>
  
  <p>I have this information in the console</p>
  
  <pre><code>FORM VALID
  f:48.png
  /17/3/48.png
  </code></pre>
  
  <p>(/17/3 is the prefix)</p>
  
  <p>In the Traceback, in the browser, under local vars, I have this:</p>
  
  <pre><code>pref    '/17/3'
  mylist[] 
  f   &lt;InMemoryUploadedFile: 48.png (image/png)&gt;
  pk '17'
  form    &lt;myform bound=True, valid=True, fields=(thefile)&gt;
  request&lt;WSGIRequest: POST '/dataset_storage_upload/17/3/'&gt;
  </code></pre>
  
  <p>I think this tells me that there is a file 48.png in memory. So why is it not there when I open it?</p>
  
  <p>Many thanks for your attention.</p>