Forums

Process file with Flask

Hi, I have a python script that receives a file path, verifies that is a docx or text file. after verifications, it summarizes the text file and print out the result. I am trying to integrate that with Flask and a basic HTML. in the HTML, the user uploads a file. I need that file object to be saved as a variable and sent to my function. Then print out the result.

How would I go about that?

We can't give you a step by step tutorial, but this blog may be something to start with: https://blog.pythonanywhere.com/169/.