title: Python Mechanize file upload keeps uploading 1kb files
body: <p>This is how I initialize my mechanize browsers</p>
  
  <pre><code># Browser
  br = mechanize.Browser()
  # Cookie Jar
  cj = cookielib.LWPCookieJar()
  br.set_cookiejar(cj)
  
  # Browser options
  br.set_handle_equiv(True)
  br.set_handle_gzip(True)
  br.set_handle_redirect(True)
  br.set_handle_referer(True)
  br.set_handle_robots(False)
  </code></pre>
  
  <p>After logging in and moving to upload page, I use this code to upload</p>
  
  <p>It works, it's just the image it keeps uploading is always incomplete and is 1kb in size -.-</p>
  
  <pre><code>br.select_form(nr=0)
  filepath = 'C:\Users\myusernamelol\Desktop\d6sEz.jpg'
  
  
  br.form.add_file(open(filepath), 'text/plain', 'd6sEz.jpg', nr=0, name='file[]')
  
  
  br.submit()   
  </code></pre>
  
  <p>What's making mechanize NOT upload the full image?</p>