title: Read text file from input type file
body: <p>I have from and in the form the user can upload files.
  I'm using flask, and what im trying to do is to get the data from the text file that the user choose to upload.</p>
  
  <p>There is any way to read the data inside the text file?
  I have tried to open the file <code>file = open()</code>, but then i realized that i dont have the path.
  Its diffrent then reading file on your local machine.</p>
  
  <pre><code>@app.route('/admin',methods=['GET','POST'])
  def admin_panel():
      if request.method == 'GET':
          return render_template('adminpanel.html')
  
      if request.method == 'POST':
          email = request.form['email']
          file_data = request.files['file']
          file_name = secure_filename(file_data.filename)
          file_data.save(os.path.join("system","files","text",file_name))
          with open("system/files/text/file_name") as f:
              file_content = f.read()
              print(file_content)
          file = File(file_data)
          file.read_file_dif()
  </code></pre>
  
  <p>Well of course this code does not working. But thats the idea.
  Anyone have any idea how i can read a text file from an input file tag?</p>
  
  <p><strong>HTML TAG</strong></p>
  
  <pre><code>      &lt;label for="myfile"&gt;Select a file:&lt;/label&gt;
        &lt;input type="file" id="myfile" name="file"&gt;
  </code></pre>