title: uploading html files and using python
body: <p>For my forum, I tried uploading a file with html using:</p>
  
  <pre><code>&lt;form action="profiles.py" method="post"&gt;
  &lt;label class="labelOne" for="pics"&gt;Change your Profile pic &lt;/label&gt;
  &lt;input type="file" name="uploadField" /&gt;
  </code></pre>
  
  <p>My python function takes that file, creates a file under userprofiles, and writes the data to it:</p>
  
  <pre><code>file = open('../data/accounts/userprofiles/'+str(form['name'].value)+'/'+'profilepics', 'w+')
  file.write(str(form.getvalue('uploadField')))
  file.close()
  </code></pre>
  
  <p>So, If I want <code>burger.jpg</code> to be my picture, I upload it, python takes that and creates a file with that name <code>burger.jpg</code> using <code>w+</code> and then it writes the data to it(which should be the image). </p>
  
  <p>However for some reason, I get no image. </p>
  
  <p>What should I try next?</p>