I want to build a web service that will process some files.
Here is what I want to do:
- User uploads a file to the server using "upload form", the file is saved as a temporary file on the server-side
- Server-side python script processes the temporary file and produces some statistics (for example, number of lines and words in the file)
- The statistics are displayed near the "upload form"
The question here is: I would like the file to be processed in the background just after it is uploaded, and after it is done, .append()
the produced results to the current view. I do not want to assign a script to <form action="processing_script.php">...
because the user will be redirected to the processing_script.php
after clicking the Upload button.
Any clues? Maybe some neat ajax call?