title: Flask-WTF 'FileField' object has no attribute 'has_file'
body: <p>I combine <strong>Flask-WTF</strong> and <strong>Flask-upload</strong> to handle file upload on my App.</p>
  
  <p>My package versions are:</p>
  
  <pre><code>Flask-Uploads==0.2.1
  Flask-WTF==0.11
  WTForms==2.1
  </code></pre>
  
  <p>Here is the snippet of my code:</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from flask_wtf import Form
  from flask_wtf.file import FileAllowed, FileRequired
  from wtforms.fields import (StringField, SubmitField, FileField)
  from wtforms.validators import InputRequired, Length
  from app import photos
  
  class AddCourseForm(Form):
      name = StringField('Course name', validators=[InputRequired(), Length(1, 100)])
      image = FileField('image', validators=[FileRequired(), FileAllowed(photos, 'Images only!')])
      submit = SubmitField('Add course')
  </code></pre>
  
  <p>And here is the snippet of the upload code:</p>
  
  <pre><code>@operator.route('/add-course', methods=['GET', 'POST'])
  def add_course():
      form = AddCourseForm()
      if form.validate_on_submit():
          course_name = form.name.data
          filename = photos.save(request.files['image'], name="courses/" + course_name + "_course.")
          course = Course(name=course_name, image=filename)
          db.session.add(course)
          db.session.commit()
          flash('Successfully added {} '.format(course.course_name()) + 'course', 'success')
          return redirect(url_for('operator.courses'))
      return render_template('main/operator/add_course.html', form=form)
  </code></pre>
  
  <p>But, when I submitted that, I got this following error:</p>
  
  <pre><code>AttributeError: 'FileField' object has no attribute 'has_file'
  </code></pre>
  
  <p>Then I tried to following this <a href="https://flask-wtf.readthedocs.io/en/stable/form.html#validation" rel="nofollow noreferrer">documentation</a>, without Flask-Upload by passing the extensions directly:</p>
  
  <pre><code>image = FileField('image', validators=[FileRequired(), FileAllowed(['jpg', 'png'], 'Images only!')])
  </code></pre>
  
  <p>But I still got the same error.</p>
  
  <p>So, what's wrong with my code..?
  Please, any help would be appreciated :)</p>