title: Flask: Get the size of request.files object
body: <p>I want to get the size of uploading image to control if it is greater than max file upload limit. I tried this one:</p>
  
  <pre><code>@app.route("/new/photo",methods=["POST"])
  def newPhoto():
  
      form_photo = request.files['post-photo']
      print form_photo.content_length
  </code></pre>
  
  <p>It printed <code>0</code>. What am I doing wrong? Should I find the size of this image from the temp path of it? Is there anything like PHP's <code>$_FILES['foo']['size']</code> in Python?</p>