title: Calculate md5 from werkzeug.datastructures.FileStorage, but saving the object as file is empty
body: <pre><code>@app.route('/upload', methods=['GET', 'POST'])
  def upload_file():
      if form.validate_on_submit():
          #get pdf file
          pdffile = form.pdfupload.data
          #next line causes exception
          filemd5 = hashlib.md5()
          filemd5.update(pdffile.read())
          filemd5name = filemd5.hexdigest()
          #next save file
          pdffile.save(filemd5name+'.pdf')
  </code></pre>
  
  <p>Unfortunatelly, after hashlib.md5 the filemd5name+'.pdf' is an empty.</p>
  
  <p>Is there any way to get md5 from the file and saving the whole file?</p>